Practice breathing and meditation. Take slow measured breaths, in through the nose as if you are smelling a flower, out through the mouth as if you are blowing on a hot spoon of soup. Meditate by trying to relax your body from head to toe. Try sitting in the seiza, knee seat, position. Focus on a tranquil vision, such as a sunset. Repeat some word or phrase such as "breathe""relax" or "focus" until it passes. Next time try it earlier, to minimize the length of the attack.