Panic has this cycle that needs a break. See a psychologist trained in Panic related issues or CBT for Anxiety issues. One has to distinguish between real panic and false alarms that's what the training will be about. Once you can manage to see the difference and gradually manage your thoughts and emotions. It will be easier when panic attacks.
Next Steps
See a psychologist who is expert in CT for anxiety. Online offline
Health Tips
Sometimes exposure and breathing related skill will also be required and that will help you manage such situations in a better way.