I caught myself asking myself this to help manage in situations where my anxiety spiked. At first I was embarrassed to admit it, then as soon as I started explaining what I was thinking, it clicked that I was actually doing something I'd learned in group therapy a while back.
It was the concept of essentially shifting your mode of thinking in the heat of a anxious/panic-y moment. In an effort to stop the fiery, emotional, reactive, flight-y default response, the goal is to start using your mind in a different way - using the logical mind. Rather than let your mind lead itself down the rabbit hole of the emotional, ill-fated response, think logically and rationally.
Sure... How exactly?
I've learned that I can cool myself down by imagining myself in a hypothetical situation, like thinking "what would Yoda do in this situation?" (no joke, welcome to my brain). This has helped me shift from an emotional, destructive and reactive way of thinking to a logical and even whimsical way of thinking. I consider the factual answer to the question and in the same instant find myself amused with myself, all in a matter of seconds. No joke, I do this a lot.
So, aside from admitting my geekery, what exactly is this doing? This is getting me out of the heated emotional response and into a more logical way of thinking. The human mind doesn't work on both levels at the same time. We don't yell clear logical thoughts in the heat of an argument - sadly, we're more likely to say things we regret in those moments. But, if somehow you can force your mind to accept logic and begin to re-assess the situation, you stand a chance at regaining your footing in the situation.
When life deals you a shitty hand, in the heat of the moment, it might feel like the end of the world... But hindsight tells us it's going to be okay.