Need some advice

my boyfriend is distant for a good reason, his mum is dying of cancer she has been asleep for 4 days straight and things ain’t looking good but I am trying to be there as much as possible, this morning is snapped at me calling me really nasty names I walked downstairs to get ready for work when I went back up to get my bag I said to him I know your stressed and you don’t mean and went to kiss him and pulled away, I walked out because I know his stressed and upset but I am there for him and he keeps saying ‘I’m this close to leaving you the things you do’ all I’m doing is helping but I just feel like I’m walking on egg shells and worry everyday I wake up he is going to leave me.