Sometimes tricky situations can just be a little misunderstanding or miscommunication. Before doing anything at all, clarify what exactly the issue is. This can help avoid an outburst that makes you look unprofessional.
Always remember to not do anything with anger, whether to reply or make a decision. Anger clouds your judgement and can make a situation even worse when things are said out of anger. So, take a step back, try and regroup, then decide your course of action.
A great way to avoid losing control of your emotions is to know what triggers you. It'll help you recognise if something is going to upset you, it helps you prepare yourself to stay calm, and at times you'll even be able to anticipate how the other person will react.
At any given situation, especially a tricky one involving emotions, always remember to be respectful and maintain professionalism. Anger does not need to be answered with anger, the same goes for rudeness. Take the high road and always choose to be civil even when the other person isn't.
If you are at fault, apologise. There is no use prolonging an issue when the solution is simple. Acknowledge your mistake, take responsibility for it and apologise. More often than not, a difficult situation can cease to exist with a simple apology.
You can change the outcome of a situation with what you decide to do. Choose one that promotes a harmonious workplace.
Clarify exactly what the issue is
Don't react when you're angry
Know what triggers you
Always be respectful and professional
Apologise if you are at fault