I've been having them for 15+ years, off and on, lately more frequent. Usually I get them out of the blue, not necessarily triggered by any particular conscious thought (at least that I'm aware of). Haven't really found any sure remedy, but a couple things can help.
Not resisting is a big one. It is your resistance, not wanting the panic feeling, fighting against it, that amplifies it even more. It's possible to not push against quite as much, realizing it's an episode that is happening for a reason, and you will purge and cry and release trapped energy and move through it and survive. Be mindful of underlying thoughts that are triggering the episode, watch it all happen rather than partake, like a bystander or a moviegoer.
Diaphragm breathing can help quite a bit. Put your hand on your belly, stand sideways in front of a mirror, and breath in and watch your belly (diaphragm) fill up full, like you're super bloated, and then totally release and suck in like a starving person as you exhale. Your chest should not expand at all, just your diaphragm. Focusing on this, watching yourself in the mirror as you do it, can release a lot of the panic stuff.
Along with this, making an MmmMmmmmm sound deep in your throat as you exhale, tends to break up blocked energy for me in a big way. You don't need to open your mouth when you do it, not like you are singing, just push out from your throat and diaphragm as you exhale and feel that MMmmmmmm reverberate in your throat and chest. You'll start to feel more calm doing this.
I always find if i can get myself to cry then I feel a lot better during an episode. Sometimes just forcing a cry, like a deep belly cry that you can create before it happens for real. The body usually picks up on that then and starts genuinely crying. The episode is always decreased after that. I feel like panic attacks are always about blocked energy. Anyway you can release built up emotion and tension will always help the episode. Yelling into a pillow and lashing out, allowing your body to freak out like and toss around like you are possessed, can bring on some genuine energy releasing.
An alternating hot/cold shower, extreme hot and extreme cold, standing under this will provoke some energy releasing and neutralize your body.
Sometimes you have to get creative and just try whatever intuitively comes to you in that moment. Most important though is non resistance.
Thinking about my natural death someday, in old age, feeling that this life is temporary and essentially grounded in nothing concrete, knowing that all my fears and worries and personal demands will one day seem completely irrelevant and be lifted and freed, and this body will be returning to earth without me knowing or owning it, this can be really humbling and relaxing in a panic moment. Death isn't something we should be pushing away and avoiding, to embrace that finality and live with that will strengthen you. Anything you can embrace and own and love, including fear, will empower you. Everytime you push something down and away in avoidance and denial, you are disempowering. Try to make love to the panic, not war. All the crazy body sensations that come, let them come and let them ride and watch them with amusement, try to find simple joy in the fundamental experience, interested and grateful that there is even anything at all to experience.