There are many breathing techniques that can be used to prevent panic attacks and anxiety disorders and to alleviate their symptoms. Scientific studies convey that diaphragmatic breathing is very effective in handling attacks. Deep diaphragmatic breathing or abdominal breathing during a panic attack regulates the blood pressure, helps to prevent dizziness by balancing the oxygen-carbon dioxide ratio.
You can read more about deep diaphragmatic breathing here.
Another technique that can be used against panic attacks is sama vritti pranayama. Also known as equal breathing or box breathing, this relaxing breathing technique helps normalize the release of hormones (cortisol - serotonin - oxytocin balance) associated with an anxiety attack. This technique also calms and clears the mind and improves focus and facilitates emotional control.
Relaxing breathing exercises work by triggering the parasympathetic nervous system in charge of rest and digest response of the body. This takes the body out of the fight of flight state.
If you feel an attack approaching, turning to breathing techniques can help prevent the attack. Concentrating on the breath during an attack will help alleviate the symptoms and calm the mind and body down. Regular breathing exercises offer many benefits in terms of both physical and psychological health in the long term. But you should keep in mind that breathwork does not substitute medical treatment and should always consult your doctor in serious cases.