Allow me to repost something I posted some years ago:
I have always modeled safety as a "cone" in the water that is point down. As long as you are inside the cone you're OK, when you start to drift outside of it you are in trouble and when you are completely outside of it you are not going to make it. Skill, as transmitted through training as well as experience both teaches you how to stay, not just inside the cone, but to stay in the center of the cone so that even as you go deeper and the circle scribed by the intersection of the plane of your depth and the cone narrows, you are still close to the middle. Panic results in the almost chaotic jump from inside the cone to somewhere outside the cone with little or no frame of reference as to how to get back. This is sometimes the result of a single big predictable or stochastic event, but is more often the result of a series of small displacements, each one of which multiplies the one(s) that came before. What is the difference between say Parker Turner struggling to get to the opening till he passes out and the new diver clawing his way to an embolism because his valve was not open all the way? Are either of them just bad luck? I don't really know ... some would say that it is a lack of imagination, while others would say that it is strength of will. If I had to guess I say that lack of panic comes from the habituation of good habits that jump you back into the cone, almost without concern as to where you were displaced to. Thinking slowly, taking a deep breath, and knowing that even if all your gear has failed you've got four minutes or so (rather a long time) to solve your issues can go a long way.