If you’re out in public when it hits try playing Solitaire or Tetris on your phone. I know it sounds weird (and old school) but it forces your brain into a simple mindfulness task.
This helps calm your mind by moving it into a state of flow which can ease you out of, or away from, an anxiety attack. If you focus completely on the game and nothing else it will also help your breathing. And as others have said this will then help your nervous system.
There are now studies out there on the use of Tetris for helping anxiety. Apparently it is also helpful for PTSD.
The concept of Mindfulness underpins it all. Complete focus on the present moment/task.
Hope this helps 💜