I think its a case of balancing your situation and trying to be there for your friend.. Sometimes its just not possible you have to take care of you , other times it can be good to get out of your own head and help someone else.
Only you can make that choice. I hope both you and your friend are doing better