I haven't had to face weight loss on doctor's orders over an impending surgery so I can't imagine how scary that has to be.
However, maybe the ultimatum I gave myself last year isn't too far off because it was the only way I could see myself moving on after a miscarriage.
Although I'd lost quite a bit before, I was in the process of letting myself go again when I'd found out I was pregnant. And when I lost the baby, I realized that I was in no shape to be a good mother, not physically, not emotionally . . . and all I could do to make things better was to make changes for the better.
Which is probably where you're at right now . . . all you can do to make things better is to make changes for the better. And you can so do this, especially when you break the changes down into manageable steps and take it one day at a time. We all know you can't change the past, but you've got the power right now to do everything you can to set yourself up for a better future.
Good luck to you, and take care. You'll no doubt feel so accomplished when you've conquered this and can get that procedure taken care of.