The answer to that question would be worth a Nobel Prize in psychiatry (I'm drawing an analogy, I think there is no such thing, not sure).
That said, and I'm not prone to panic attacks unless there is a clearly identified threat, even a psychological threat, such as a lot of open space (height without protective barriers) - I find I am usually able to force my mind away from troubling thoughts (even panic) by focusing on something else, and if no action is required (like get down from the top of the ladder, until I can adjust), I sometimes focus on something I like to do, like fishing... a neat car, some activity or object the is positive in my mind. This works for me, but again, I am not experienced with dealing with panic attacks.
Sorry my question did not came out the way it was supposed to be. Now the right one.
What can I do to stop worrying about having another panic attack?
Amethyst