So here's what I do when I notice I have gone into this head space of total meltdown.
Firstly, I catch myself. I become aware that I have gone into a head spin and I tell myself it's okay. Then I notice where my feet are. Yes, I ask myself - where are my feet? I look at my feet. Then I look up, and look around the room/office/place where I am, and in my mind I start naming 5 things I can see, 4 things I can hear, 3 things I can smell, 2 things I can touch and 1 thing I can taste.
What this quick practice does is centre and ground myself back in the present moment. With lots of practice, we begin to notice that most of the time (maybe 8 or 9 times out of 10), when we are caught in feelings of overwhlem, stress, worry or panic; it is our thoughts that are creating these situations, as opposed to our present moment. Yes, we may be facing a challenging situation, but when you get present again, you see that your thoughts add legs and arms to the event and make it much more worse. Connecting back to the present and what is actually happening, is the quickest way to free your mind.