I'm sure I would have reacted similarly.
When I am caught off guard it is a good time for me to use some one-liners on myself. They can really help me re-focus. It gets easier and faster the more I do it!
If I'm feeling panicky or guilty I might remind myself "Feelings are not facts."
If I'm distressed over someone else's issue I'll say "Whose hula hoop am I in?"
If someone is being a dumb azz and it is getting under my skin I say to myself "Get on my own side of the street."
Is there a one liner that hits home for you that you can pull out and use to re-focus in case it happens again?