Up front, I must say I'm not a mountain biker.
But I have had some big road crashes, and done a fair bit of off-piste downhill skiing. I understand the fear you describe. Let's analyze what you've told us. Understanding the cause and learning is the key to going beyond. Like when I broke a leg ski racing - I got over-confident and over-rotated into the tightest steepest gate, caught the outside edge, and with a sound like a gun-shot my tibia exploded. The point is - I learned the cause, and learned to ski better.
You say "a stupid bad crash ... my wheel got locked". Translation: "I was riding beyond my skill (and maybe equipment) level and got found out".
How to get back? Firstly, learn from it. What skills did you need right then that you could not call up right when you needed them? I already said I'm not a MTBer, but I have a few suggestions
- Concentration - did you loose concentration at just the wrong time? One skill to learn is "switch on". Approaching a tight bend - switch on! Approaching a steep descent - switch on! You get the idea - switch to full alertness and concentration.
- Steep downhill - revise all you've learned about the basics of downhill, and practice starting back with really gentle, safe descents. Relearn those skills, doing it again and again. Gradually working up to steeper and steeper hills, with a variety of trails and surfaces.
- Reframe - you say you're terrified. Think of it as respect. You've learned a whole new respect for steep hills, and rocks.
- Be positive - you only broke a few teeth. It could have been worse. Perhaps you'll wear a full helmet next time you go someplace like that.
- Your road skills have nothing to with the crash. It's great that you're riding at all, but you crashed doing downhill; they are the skills you need to revise.
Don't expect or force yourself to ride beyond your skills and new found level of respect. And don't let anyone pressure you either. The key is confidence. Not over confidence. Without confidence, like me skiing a steep slope, you are certain to crash. But with well-founded confidence in our skills we can do much better.