Fear is the point here. On the same line of pain and fear which you've already experienced, if you go on you will need to cope with rage, adrenaline dumps, loss of confidence or willingness to surrender, bleeding, inability ot breathe normally, extreme fatigue and not being able to fight back properly.
Even losing consciousness or having some bone broken are possibilities, but they almost inevitably end the fight so they are outside the scope of this answer.
One side of the matter is addressing fear, the other side is dealing with all the nasty bodily side effects of the above conditions. Understand also that body and mind talk to each other and the effect is tangible, and it can happen that there is a nice way to fix a mind problem with body practice (or vice versa).
Fear is a real threat as it makes you slow, weak, sloppy, dim-witted. Surprise, shock and panic in real life situations can be a death sentence as affected people often fail to accomplish tasks that could save their lives - even the most basic ones. On a couple of occasions in my life I have been frozen still by fear.
Will to fight (or to live) is also crucial, as many people caught in disasters just let themselves die (see Survival Psychology by John Leach); if you let that happen in a fight you're in real trouble. It does not take a disaster to experience it, I know it first hand.
As it has already being pointed out, a good way is to experience these states of mind, get familiar with them and their effect slowly will start to weaken.
How to trigger them is a matter of choice: hard sparring is a way, bungee jumping also is. Afraid of water, spiders or blood? You might have an opportunity right there.
I've found Yoga to be beneficial in this regard, as you try to be comfortable and relaxed in an uncomfortable situation. Yoga also provides you a deeper knowledge of your body and a more intimate body-mind connection, which provides confidence and control.
Controlled Breathing is very important: it is both beneficial as it empowers athletic tasks, as the Valsalva maneuver or Kiai, but it also can be used to affect your parasympathetic nervous system (see here). It also helps to manage fatigue and pace during a fight.
Many discplines practice controlled breathing exercises, Yoga and Qi Gong surely do.
Toughen up your mind by realizing that all the following troubles are just inconveniences, they do not have to affect your performance: blood just stains and it doesn't kill, pain is a trick to make you rush and make mistakes and at most will weaken your muscle contractions, surrendering is never an option, raging gets in the way of proper form, getting choked means you still have time to react, if your nose gets broken that's why you also have a mouth. Busted lips? You're handsome anyway!
Stay positive and sharp: keep your form good, work your techniques, keep on trying. Just be mindful and wise; to make it easier, set a clear limit: when sparring for example if you need to tap out, tap out; in case of injury, stop immediately.
I think the body-mind connection is important to you right now, just the keep in mind that other approaches exist: the conditioning aspect has already been addressed in another answer. As an added bonus, just practicing conditioning also helps your confidence in your capability to withstand painful blows (via placebo effect).