Frankly I am a bit scared. What should I do to avoid injury in the future? I have taken similar spills as a kid, and not really been injured. It really sucks as I am just 5 weeks from my tri, and I was going to crush my time goals. Now I will have to go back to the drawing board for training three months from now.
As a first step I think you should let go of these races. If you want to regain confidence, you have to remove internal/external pressures, such as being race ready in five weeks, and just focus on the basic task of riding and getting confidence back on the bike. Having too many goals (i.e., 1) get back on bike, 2) get confident on bike again, 3) crush training) will get you have you splitting your attention and likely doing all 3 poorly.
You may have been in a great form, but unfortunately you had an accident with some substantial injuries (broken clavicle and a punctured lung), and in the time off you probably lost the fitness. It sucks, but its the reality. Luckily, once you had fitness it is much easier to get it back that it was to first develop it, so all is not lost. That said, recover from injuries and be race ready in a window of only 5 weeks is a serious stretch goal. That is a lot of pressure for anyone, including pros that have come back from previous injuries (once you have done a task it gets easier to repeat). As this sounds like your first time recovering from an injury, I think you need to reset your goals, and give your self some compassion for recovering. Focus on each step in the recovery process, avoiding looming deadlines as these will often detract from the process.
I attempted to get back onto the road by lifting my front wheel kind of a front wheel bunny hop. Instead I caught the edge of the road and rotated down. I was clipped in, so I landed hard on my shoulder and subsequently head.[...] have taken similar spills as a kid, and not really been injured.
Maybe it was bad luck, maybe you are older and don't bounce as well. Maybe its both. Its hard to know exactly what happened in an accident. Often we unknowingly fill in missing information. I wouldn't dwell on all the details too much, you may never get a complete answer.
The only thing I would take away, is that if you get blown off the road to try and stop off road, get off and walk back on to the road. You have already had one serious crash trying to jump back on over the lip. Unless this handling skill is something you explicitly start to train and develop I would avoid it!