I just sent that as a reply to @maniflames but I thought it might be useful to other people so here it is.
The only way out is to sit and meditate.
First try 2-3 minutes.
Close your eyes.
Slowly breathe in, from the nose.
Focus on how it feels when the air enters your body.
Focus on that only.
Put all your mind trying to feel how every bit or air caresses your inside as it enters your nose and then the lungs.
Try to feel the oxygen entering your blood.
Keep the air inside you for as long as it feels ok.
They slowly breathe out, from the mouth.
Put all your mind trying to feel how every bit or air caresses your inside as it leaves the lungs, and the mouth.
Then stay empty and feel how it is to be empty, for as long as it feels fine.
Then slowly breathe in again, slowly.
And feel again.
Do that for 2-3 minutes as soon as you feel the panic or the anxiety overflowing.
Just quit whatever you’re doing and sit, and breathe, slowly.
When you're used to doing that 2-3 minutes in a row, try to go further.
Breathe even more slowly
Keep the air inside you longer
Breathe out more slowly
Stay empty longer
Do that for 10 minutes, and then 20, and then 30.
As soon as you feel uneasy or preoccupied, just sit, and breathe, again and again.
Claim your page on DEV before someone else does
Level up every day