Those two lines of thought are your primary problem. Never, ever, ever, grab a hand or foot full of anything. You know why we say practice? So that when instinct takes over you perform like you practice. It's called muscle memory, you automatically do what you need to do, on the brakes faster and harder than normal, but smoothly and methodically. Even ABS or a linked system will put scratches on your helmet if grab a handful. Don't think grab, stop saying it. From now on be in control, train your instincts how to react.
The second line of thought is don't let yourself panic. That's as bad as grabbing a handful of brakes. You panic you start making irrational decisions. Be alert, be aware, don't let yourself panic. Think of it as emergency braking, not panic. You change the way you think you'll be cooler when the time comes.
And if the rear tire is on the ground it can help you stop. If the rear tire is in the air you've lost the vast majority of your directional control. Two irrefutable facts.
Learning to be in total control, even when it seems to be the last thing you have, is what separates the great riders from the good ones. Beyond raw talent what makes the Rossis or Haydens of the world so good? They practice constantly and they are in total control when 99.99% of us would have pulled the parachute and gone home.