It’s easy for a therapist to recommend you learn how to distract yourself during a panic attack, but actually doing so can take some practice. Since negative thoughts about yourself and your life are often the root causes of anxiety, then getting your mind off the panic would seem a good way to keep attack under control. In other words, you have to distract your mind so you don’t focus on the panic onset.
The therapist taught me some ways to distract myself when I feel anxiety growing. Some people count, but to be honest, counting makes me more nervous. My approach is to sing a song that makes me happy or focus on something around me.
If I feel anxiety while in the grocery store for example, I’ll go to the coffee section and check out the gourmet coffees (decaffeinated of course). I really enjoy drinking decaf coffee so shopping for coffee and flavored syrups is a pleasant experience. The point is I do whatever I can to replace the anxiety with something nice.