I haven't thought about it too much, but I create these positive mental ticks for myself through my hobbies of handmade crafting, gardening & travelling.
I'm overall a pretty joyful and happy person so it's not very hard for myself to maintain a healthy mindset.
Hopefully that's always the case and you can maintain it in times of adversity when they strike. Well done.