Reset Mechanisms
I know of 2 ways to ground oneself: enduring survival conditions and anchoring expectations to that experience, or appreciating the magnificence of an amazing universe at full capacity. Both work, but the latter can be evoked by anyone at any time.
I routinely fall into first-world perspectives, but if I'm able to climb out and compare to true hardship, my problems fade into oblivion. Likewise, modern luxury can make it easy to take comfort and convenience for granted; but when I respect the sheer incredulity of it all, life becomes much simpler and more peaceful.
There may be other strategies, but understanding how good you have it and contemplating the magic of reality are both accessible and powerful. Basically: it's probably not that bad in the grand scheme of things, because the grand scheme is infinitely spectacular.