I completely understand the anxiety and frustration, but try to relax - it will all be ok.
I had to take about 8 weeks off from exercise this summer due to an emergency abdominal surgery, and I, too, was worried that I'd lose all the gains I'd made over the previous 6 months. I did feel a little weaker when I returned to the strength training, and for a few weeks I was moving more slowly on the treadmill due to lingering pain and swelling, but I returned to "normal" in regards to exercise more quickly than I expected. After my surgery it was extremely frustrating being in so much pain and moving around so slowly for a few weeks, and I was so anxious to get back to the gym once I began feeling a little better, but looking back ~8 months later that period seems like just a blip in time.
You're going to be fine.
Good luck with the surgery, and I can't wait to hear how it all goes!!!