How to release my anger?

Hey guys... I'm so disappointed and annoyed by a person. I have been a good friend to him but he always hurts me though his stupid dumb joke and annoys me through his carelessness. The thing is that when I try to open up he says, that I'm full of negativity and accuses me which irritate me even more. But at the same time, I can't avoid or ignore him as he is the only frd I have and no others are close to me. But Today I lost my shit. I couldn't control it anymore. Im sooooo mad at him but I can't show it to him or anyone else.
So guys can u pls suggest me any way to get out of this?
How to release my anger?
Add Opinion