When my daughter was younger and had panic attacks, I'd reassure her she was ok and to calm her down I would distract her by verbally giving her math problems to solve. Like 2+2,4+4, etc. it was over quick.l Later when she felt an attack coming shed"d do it on her own and eventually got over them entirely. Her attacks were triggered due to separation anxiety and only lasted around 6 months