Stoicism in a nutshell. You aren't responsible for other people's behaviour, only your own. There is nothing wrong with feeling, whether it's anger or joy. However, it is entirely up to you how you respond to those emotions.
That said, when you slip and react in line with your initial emotional response, there's nothing inherently wrong with that, to err is human after all. But cultivating the skill to take a deep breath before responding will reduce the occurrence of moments like that.
It's critical skills for guys especially. We're no less emotional than women, but we have a duty, due to our greater capacity for destruction, to learn how to manage our responses.