Work on learning a set of sentences to tell yourself... over and over... until it's habit and kicks in when something like this begins again... it will help change your mood, your reaction...and with time will prevent such a reaction.
The "mantra" needs to address the truth of the situation.... stay away from what you feel is truth... but it has to be yours... something along the lines of "She can't (hurt) me...I only saw (see) her.... she doesn't affect me any more, I'm okay."