all is not lost!!! the wight will come off with your consistent riding ahead, so don’t freak out.
it’s almost july, so look for an event in late August or September; you have 6-8 weeks to be better than you are now.
Sure, being derailed like this is no fun, but it’s life and the fitness gains you made WILL COME BACK.
I’d just start ridining consistently for 1-2 weeks then ramp test and jump into a speciality plan based on your august/sept goal.
Let us know how it goes!