Hugs to you!
He is lashing out. Anger is a part of grief, and he has no one to lash out around. There is no possible way he could have fixed it.
Go forward in peace knowing you did the right thing. It's ok to love someone from afar when their lifestyle will be destructive to you. That's a fact.
Tight hugs. I am so sorry for the loss of your friend.