How To Help Someone Having An Anxiety Or Panic Attack
Ask What They Need

Another one of the most important things you can do is to ask the person having the anxiety attack what they need. Whether it is a stranger or a close loved one, you must remember you are not inside their head. You also have to remember different individuals have different needs when it comes to recovering from panic. What works for one individual may cause increased fear in another. For this reason, even if you have seen others have panic attacks before, you should still ask the individual what they need. Doing this also lets them know you are listening, that you want to help, and that they have some measure of control over the situation.
Some individuals may want to be hugged during a panic attack, since the weight and pressure can be grounding. However, others are completely averse to being touched. You should never touch a person having a panic attack without getting permission first. If they are hyperventilating or too panicked to speak, assure them you are here for them and sit quietly with them until they can communicate their needs.
Encourage Them To Breathe

Another way you can help soothe the individual having a panic attack is by encouraging them to breathe. However, do not be forceful about it. If you demand they take deep breaths or act harshly, you are quite likely to make their anxiety worse. Being encouraged to breathe can sometimes be frustrating for those having panic attacks, since they do not always have control over it. If it seems like the encouragement is doing more harm than good, use other means of soothing them.
One way to help with breathing is by doing active breathing exercises with the individual rather than telling them to take a deep breath. Have them breathe in with you for a count of four, then exhale for a count of eight. If they cannot manage that, try breathing in for a count of two and then out for a count of four. The most important thing is for them to exhale longer than they inhale. This helps activate the parasympathetic nervous system, which acts in opposition to the adrenal system by giving the body signals that it is safe.