I don't know about sudden spiralling into despair but when I have a sudden panic attack, I try and take long, slow deep breaths. Not sure if it's the breathing that helps or just that I'm focusing my thoughts on that rather than the panic but it helps - a little. That and I tell myself that it's fine, that everything's fine - that I'm fine. That kind of thing.
Not sure if any of that will help you at all.