I'm an inexperienced diver, but I am very experiened with panic, so I understand the feeling. (Oddly enough, I felt quite calm the first time I breathed underwater...no one ever said this stuff was rational).
First of all... diving is strange and puts our body through some very different feelings. The fact that your body sends you danger signs means that it is doing its job. It is how you interpret those signs that can lead to panic. Panic feels scary, so we often treat it as a danger in and of itself. It is not. It is merely a physical response that gets misplaced sometimes. Once it starts it can create its own circle of negative thoughts that is hard to break.
So here are a couple techniques. First... practice breathing. Maybe even learn yoga tenchiques or something similar. Breathing probably has more to do with panic than anything else. Become aware of your breathing so that when you feel tense you can immediately focus on your breathing and use it to relax.
Next, use your intellect. When you start to feel those very first sensations, simply observe them as what they are: physical things happening to your body in response to an unfamiliar situation. So instead of saying "Oh no, my heart is beating fast, I can't handle this, I'm going to freak out," say "Okay, my heart is beating fast, that is simply a sign that I am nervous. I need to remember to breathe properly." That way you break the spiral of negative thoughts.
That said, these are techniques that I have learned for life on the surface. In everyday life you can just bull your way through it if you need to. You can't do that underwater. Panic turns your mind inward and makes you very prone to mistakes. If you can't get a handle on it before a dive, do not do the dive. Then forgive yourself and work on what you need to work on and dive next time.
There's nothing wrong with baby steps. Furthermore, this is supposed to be fun. If it isn't fun, to hell with it. There are plenty of other fun things to do.