It is really good that you are thinking about avoiding panic NOW before you might encounter a problem.
I am absolutely in agreement with the people that recommend practicing holding your breath, developing a bit of endurance, and familiarity with the feeling of needing to breathe, but can't right at this moment. Safety warning: When you practice, be very sure and do it with diaphragm (chest) control and not by closing your airway at the throat.
I'm a really old fart. When I learned to scuba, everyone that learned scuba did it as an extension of their free diving skills. When you can get along for a while without any scuba at all, it is not a big deal if you don't have it for a bit.
Practice flooding and clearing your mask so when (not if) the mask floods, you can calmly clear it. If your eyes burn for a little bit, accept it. Swim under water without a mask. Sooner or later, someone is going to kick you in the mask, so expect it as a normal part of the fun. If you completely lose the mask, realize that you can safely get to the surface on bare eyeballs.
Regulator knocked out? You have lots of time to find it and get it working before your body has any danger of loss of consciousness.
You might feel that you need to breathe at this very second, but it really is okay if you don't. Remember that there is absolutely nothing to be gained by becoming excited. All you do is use more oxygen and exacerbate the situation. You don't need a full breath of air to hold your breath, as diving mammals EXHALE before going down. It feels different, but the reality is that even though your lungs may feel empty, the oxygen in the blood stream is about the same for awhile. It won't feel good when you want air, but you should have already practiced it so it is a known side effect while dealing with the problem, which is the only real concern. Simply by knowing that you have a few seconds to use your mind and a few moments to deal with the situation, you should be far, far less likely to panic.
Demanding underwater swimming skills of scuba students will cut into the participation of the entire industry. It is probably better to not be so demanding and keep up with the liability waivers.
Steve