Unhealthy coping mechanism: take a break, put in headphones, put on the most overstimulating sad/manic/violent vocaloid music, proceed to engage in megalomaniacal fantasies of battle, world domination, and self destruction until you get bored.
Healthier coping method: try to do mindfulness meditations. Doing them even when you’re feeling more normal will make it easier to try when you are. Just trying to take a few deep breaths or focus on breathing could help and at the very least won’t hurt.
Another thing is just venting to someone or writing in like a journal. If something is getting to me or I’m feeling an emotion for no reason and it’s frustrating, venting about it in my journal seems to help me calm down and manage it better.