The key to terminating a panic attack is to settle the physical symptoms, as they are the main driver the negative cycles of thoughts-feelings-behaviours.
Ujjayi breathing is an ancient Taoist technique:
diaphragmatic breathing stimulates the vagal nerve which activates the parasympathetic system and down-regulates the fight-flight response.
Sit with your spine straight
Close your eyes
Take your awareness to your breathing
Breathe in and out through your nose
Keep the in-breath and out-breath an equal length, measured and controlled
With each breath fill your belly, allowing it to stick out
As you inhale and exhale constrict your throat making a rasping noise (a Darth Vader-like sound)
As little as two minutes of Ujjayi breathing is enough to centre your mind, stimulate you parasympathetic nervous system and terminate a panic attack.