If I'm somewhere safe, just try and sit somewhere quietly and and focus my mind. I have distraction techniques my therapist taught me to try and move my brain away from things that are getting to me, but we all know anxiety doesn't just move on easily. Techniques like the 5, 4, 3, 2, 1 method (name 5 things you can see, 4 things you can hear, 3 things you can touch, 2 things you can smell and 1 thing you can taste in the immediate area), the ROYGBIV method (find something Red, something Orange, something Yellow, something Green, something Blue, something Indigo and something Violet, say the words out loud as you find them), and more. If I'm driving or in public when it hits, I try to pull over or get somewhere safe or quiet and either use the same methods to try and calm down or just drink water. Does it work? No, not always, like I said, we all know anxiety and panic attacks don't just stop, it takes time and even then sometimes the thoughts don't stop, but you do what you can.