I was in a similar position. My fitness was improving after a long hiatus from the bike, and I was hit by a truck on a morning training ride. Trip to the ER, broken collar bone and several other injuries led to nearly 2 months off the bike. When I left the hospital I talked about giving up the road bike, but 3 days later I was itching to get back out. It ate me up every day for 2 months because I could feel all my work fading away. I tried to control my weight with diet, but still gained about 10 lbs. I lost out on my entire summer of training outdoors when it's light in the morning.
I coped by doing research and developing my plan of return. I knew my return would be restricted to an indoor trainer, so I bought a smart trainer to help give a little motivation and variation to my indoor workouts. I overloaded on TdF videos and GCN on YouTube. Generally obsessed over cycling. When I was cleared to get on the bike, I started small to learn where my body was. Above all, I listened to the advice of my doctor.
It's been 2 months since I got clearance to get back on the bike and my legs are stronger than before the accident because of a better thought-out training plan. You have lots of time to think, so develop some goals, and how you're going to get there. Then, when you can get back on the bike all you have to do is apply what you've developed.