How do others handle being triggered?

When I get upset over something (e.g. I didn’t like my husband’s tone of voice, I feel fat, I don’t like my clothes, etc), I notice myself immediately jumping to suicidal ideation and/or wanting to get a divorce. I’ve learned through therapy to recognize these thoughts so I don’t spiral anymore (I had untreated panic disorder for years before therapy, so would literally cry for days and/or scream, pace, punch stuff, etc over this type of thing). But how do I actually learn to handle my instinctive thoughts and feelings when I feel triggered? Does anyone else deal with this? Do you leave the room, take deep breaths, listen to music, etc? Have you learned to actually change your thoughts? It is so automatic and so instinctive that I find it very hard to focus on anything besides NOT acting on my thoughts and feelings in that moment when I just feel completely worthless, hopeless and/or angry. (For reference I’ve found it usually takes me about 45 minutes to actually feel relatively normal again after feeling triggered.)