There are some things that could help us manage our anger: being aware of our friend's problem makes us feel sorry for him, putting ourselves in his/her shoes, making our best to understand why the person acted that way. This may take time, so, the most suitable solution is to keep our mouths shut for at least 10 seconds, maybe then the anger will disappear.