In the earliest stages of dive training, panic is often associated with breathing issues. If you feel a little anxious, you might not breathe properly. If you don't breathe properly, you will get a CO2 buildup. CO2 brings on panic. Panic impacts your breathing more and creates more CO2, which creates more panic. This is called the panic cycle. I once had a student who was prone to panic, as you describe, and I realized that when he was concentrating on skills, he was not breathing at all. He realized that he did this in everyday life, too, and he was prone to panic. Learning to breathe continually while focusing on a task changed his life!
I have had scuba students inhale and exhale so quickly that it was like a barrier in their throats. The good air didn't have a chance to get all the way in, and the bad air couldn't get out. That is why in the very first pool session I had students imitate my leisurely, slow breathing pattern. Once I started doing that with classes, I never had a problem again.
So start by making sure you are breathing comfortably at all times. Pay particular attention to exhaling--get that CO2 out of your system! Take something like 4 seconds to inhale, let it linger in your lungs for a few seconds, and then take about 4 seconds to exhale.