Excellent feedback from our friends here.
Your friend did some manipulating and it's not cool!

He obviously has some problems to sort out; even so, it was mean-spirited for him to do that to you. I hope he never does this to you again. you have every right to be angry with him.
Please take excellent care of yourself, as this event was quite triggering for you. You did nothing wrong.
You are kind-hearted and deserve support and compassion.

WC