Practice. I watched my dad nearly slice his thumb off while cutting wood, in the middle of nowhere in France, with a meat cleaver when I was about 10. He turned to me and said 'Go to your mum, ask her for the electrical tape. Tell her it's urgent and to hurry.' I remember it clearly to this day, he didn't panic, he didn't jump up and wave his now hanging thumb around everywhere, and somehow it healed almost perfectly. From that on, any time I've been in any kind of emergency I've managed to just stop, breath, look around and plan my actions. I've managed to do this when people have fainted in nightclubs, the time I sliced my own finger down to the bone while cutting flapjack, my sister having a diabetes induced fit or the time my mum slipped down two steps and broke her ankle. While I don't suggest you do any of these things, what I think has prepared me the most is the fact my social anxiety has caused me to play these, and many hundreds of other weirder situations through in my head, over and over again, considering what I'd do in each one and allowing it to play out. So, if you can simply think the whole situation through, possibility making it more 'real' via meditation helping to imagine the whole thing, and in fact practice increasing and decreasing your heart rate, and remaining calm, on demand.