Actually, thinking about this. I've been in exactly the same situation. I used to be judo mad. I'd practice twice a week and loved it. Just when it was going really well (doing well competitively at the time as well) I hurt my knee. It turned out I ruptured my ACL (one of the main ligaments in the knee).
To get back on the mat properly I needed surgery to give me a 'new ACL'.
The recovery from surgery was 9 months, and that was how long I stayed off the mat. However, rather than get upset about it, I decided that the countdown clock had started. No matter how bad any day felt, no matter how bad the knee felt (and sometimes it did feel like it was going backwards) each day was a day closer to when I would get back on the mat. Each day was a day closer to full recovery.
I kept involved (i.e. I did my physio at the gym in the building where the judo was, at the same time, and it became a challenge to get back, fitter than I was before I went off.
It worked.

Well, sort off. I never got fully back to pre-injury (you never do with knees though) and I eventually retired a few years later. However, I had a lot of fun being back on the mat and my retiral was my decision.
So, take control. Today is the first day of your recovery, and one day closer to the day you will be back on the bikes!