You can’t believe they did it. Of all people, turning on you this way. You want to react in kind, drawing on the anger flowing through you to lash out. Make the other person hurt every bit as much as you do right now.
Wait a minute. You can’t. You’re not that person. You don’t want to BE that person. You’re better than this.

But how do you stop anger in its tracks before it gets the best of you?
Take a Walk
The physical act of walking will burn off some of the adrenaline while getting outside, giving you a distracting change in scenery. And it works even better if you’re walking away from the object of your anger. Sometimes all you need is some space.
Pay Attention to your Muscles!
Like walking, exercise is good. Also, anger tends to tighten you up, so a good stretch, or even better practicing progressive muscle relaxation, will knock the tension out.

Say Something
Choose a pet phrase or mantra which calms you. Say it several times, slowly, and deliberately to put your focus elsewhere.
Visualization
Escape somewhere else. Remove yourself from the situation that has made you mad and find a quiet place where you can visualize something peaceful. Build in as much detail as you can to make it as real as possible. Stay in this vision until you feel yourself start to calm down.