Some things that really help are:
Just open up a notebook/journal/notes app and type in a stream-of-consciousness. You aren't writing it for anyone, so it doesn't have to make sense.
If it's possible at that moment, try the 4-7-8 breathing method. Inhale for four seconds, hold it for seven seconds, and exhale for eight seconds. The most important part is the holding, and after a couple of minutes, your heart rate should go down at the very least. Helps most for anxiety, and can help to ground you in reality during depressive spirals.
If things are really bad, take a cold shower. I know, I hate cold showers and will never like them, but it can trigger a response in your brain that lowers your heart rate. It can also increase your endorphin levels, and it's also a way to ground yourself. You don't really have time to think when all you're paying attention to is how cold the water is.
If it's nighttime, and I know it's easier said than done, but try to sleep. Being up late at night messes with your mood (supported by a lot of research), and can worsen a lot of depressive symptoms. Turn on a video, white noise, a podcast (there's this nice one called I Can't Sleep where this guy reads miscellaneous Wikipedia articles in a low, droning voice. It fills the emptiness, but it's not interesting enough for you to get distracted by it), whatever helps you sleep.
Or you can do something you love. Someone mentioned playing the saxophone, which can serve the same purpose of just releasing pent up energy–just expressing anything when you've spent so long bottling it all up.
This isn't a comprehensive list, obviously. Depressive spirals can be really rough because everything just loses meaning, even the things you love doing. For me, they usually last a few long hours where I pretty much lose the ability to do anything. But I'm not always able to just ride it out, and that's when some of these things have helped me. For anxious spirals, you're not always able to just sit there and do a breathing exercise. That's when cold showers can help. Just, try to find some way to ground yourself or find a harmless way to let it all out.