It takes, I'm afraid to say... practice.
With my club we had a "practice crash session" in a gym with our sport psychologist who used to be a gymnast. We practiced "tuck and roll" (including one time jumping off an actual bike...) and maximizing surface in a fall (you want to hit your whole thigh, not on your knee or hip - big bruise, but less chance of fracture - or the whole side of your upper arm, not on your hands, which would possibly break your wrists).
It's not the same as practicing actual crashes from the bike (on grass, for instance) but it does help developing reflexes. Of course when you do fall you don't have the time to think about it. It must be ingrained in your nervous system so that the instruction to "roll" doesn't have to come from your brain...
When I ride fast I try to ride in the drops so that if there is a sudden stop I will be able to brace my arms to fight fast deceleration. However if it's an immediate stop (as if your front wheel jams, like what happened to you) then there isn't much you can do. Practice might help you roll to your side instead of to the front of the bike, but the laws of physics are still more powerful.
ETA: Practicing fast stops is also a good thing to do. You can practice first on a flat, empty parking lot, gaining some speed and then braking with only the front, then only the rear, then combination of both brakes, to see what happens with your bike and how your body weight gets shifted around...




Reply With Quote