Getting out of a bad mood is a skill. Like any other skill, you need to practice it.
Smiling releases neurotransmitters in the brain that improve your mood. First you smile, then you feel good, and not the other way around. There are all sorts of implications here that suggest your mood is more under your control than you think.
Another note: it’s harder to get out of a bad mood when everyone around you is in a bad mood, and it’s harder when everyone you follow on social media is in a bad mood. Their thoughts become your thoughts.
Keep practicing, and practice with the right people.