Panic happens because one gets scared and holds their breath. The longer one holds their breath, the more the panic increases. In truth, if one were to pass out, the body would immediately resume breathing. It is the frightened mind that has one panicking for air BECAUSE they are forgetting to exhale.
Say out loud for an entire exhale (until you run out of breath) “Ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha-ha…”
Why does this work?
By saying aloud “ha-ha-ha-ha-ha” you are exhaling, and the body is no longer terrified you are going to die. The body automatically does an inhale after you exhale. It’s when you won’t exhale, there is no room for a new breath. For without any conscious effort, the body will automatically inhale. Now that the panic is over, you have the energy and wherewithal to deal with the problem that scared you. And it doesn’t seem nearly as bad as dying, so you feel empowered and more confident, as well as more clear-headed for having taken a big breath.