Just some thoughts as an old man MTBer who started in the early 1990's. I have had my share of prangs, one put me in hospital that should not have, some I should not have walked away from but did.
Park your ego... (I found this tough). It helps to put riders into two groups - those who are your mates, and real mates (despite the egging you on and giving you a hard time later) don't want to see you hurt and won't think less of you for taking it easy. The other group either don't know you, or are not real mates, what they think is not your problem.
Get coaching if you have not already had plenty. Learning to ride perfectly is not something that we all do naturally. Part of this is learning to fall. Like all aspects of riding MTB's, learning to fall well is a skill that needs to be learnt one way or the other.
Learn to accept the fall is inevitable before it has happened, early enough to position to maximize chance of best possible outcome. (Martial art training helped me a lot).
Bail early, take chicken line - better to look like a fool and ride another day. In Aviation, some pilots think of every landing is a failed go-round, they commit to the landing at the last moment, only if everything is 100%. Same with tackling features - if you are not 100% on the approach, bail. The moment you have committed to the feature, commit. Make this commitment a conscious decision every time. Worst way to approach features is thinking "Do I, don't I, can I, yes, na, yeh... oh shit!!!"
Look at consequences. Two jumps of equal technical difficult can have very different consequences - simple example is a table to vs gap. Pull up short on one, you get a rough landing, on the other, you get a helicopter ride. What about a 6" plank ride that is 6" off the ground, vs a 16" wide bridge with a 20 foot drop into a ravine? Never ride a high consequence feature that challenges you on your best day. Don't ride the bridge till you have ridden the plank 100 times without falling. Don't take the gap jump till you have taken the tabletop 100 times and landed the ramp every time.
Look where you can have the same fun while reducing risk. If your prangs were caused by speed, slow down and go for more technical XC type trails. If they were big air jumps, maybe get your big air into a foam pit. If they happened at the end of big days because you were tired, don't go hard at the end of big days.
An additional thought is think positively and unambiguously - concentrate on what you want to happen. Your subconscious mind thinks like a toddler and does not understand negatives and ambiguity. "Don't hit that tree" translates to "Hit that tree". "Rock ahead" probably translates to "Ride over the rock ahead", but anything could happen... Instead think "Around that tree", "Stay left", "Take the high line"