OK OP has the operation worked? Was the medical issue resolved? (with recovery time of course)
I would start there, the marvel of modern medicine, the operations that can be performed is truly amazing and your body recovering and wanting to survive, to me, is like magic. So be kind to it. And yourself.
I found escaping into fiction a good motivator, I started with "easy" ish books and regain the love for reading fiction (generally written by women), I had luxurious baths, read and fed my brain.
Then you treat your body, you get back into cooking healthy, yes, but food you enjoy, shrink the portions, balance the plate, don't eat too late but enjoy eating, at a table, have a glass of wine (if you want/can), listen to the radio.
Right now I am being largely ignored by my teens, as they aren't long home, eldest is doing GCSEs for real in these coming weeks, I am listening to Radio 4 PM whilst Evan Davis (and he lovely calm voice) is explaining, without sensation, the bits I need to know about what is happening in the world, and some fun bits.
I have begun planting seeds (it's the season for it) to have a herb garden, and been inspired to freeze in ice cubes (if the plants survive) fresh herbs for use after the fresh from the plant season is over.
There is an aubergine and sweet potato just roasting. softening up in the oven to go into a curry in a bit, which makes the house smell of Asia and I get my ginger and garlic kick.
I have been spending the best part of, oh months, trying to get the eldest ready for English GCSEs, we have been battling through poetry, texts, creative writing, it's his weakest subject, he is having a second mock week this week and after his Eng Lit he came home and said "thanks for revising and pushing me" (yes jaw drop, heart burst) I really don't do it for thanks but his penny drop realisation that he was prepared because of my, basically militant, revision schedule, was very sweet.
Your family, kids, friends are not going to care that you are carrying a bit of extra weight, you will drop it again, and being in a state of mind that you are more positive helps you make more positive choices for your body and time.
Nobody judges you, or is even that interested in you as much as you swirl around in your head.
Having some time with your H might help, some affection together, or just reconnecting with how you used to be. H and I do a crossword together, we sit and eat and talk together. I am great at buying leisure tickets (theatre mostly) so mention things that we could get to and book tickets for all sorts of things, with the teens in mind.
If you have streaming watching stand up comedy is usually a pick me up. Especially stuff that the teens love as well, hearing them squeak with laughter is better than what they are laughing at (on the whole).
We watched Luke Littler win the darts, and Messi the World Cup, we search out stories of humans doing fun. crazy, amazing things all over the world (the speed rubiks cube records are bizarrely addictive).
I decided I was going to find out the Drake/Lamar (rappers) "beef" one day a bit ago. Our youngster, who knows a bit about all this, rolled his eyes but after a very funny hour or so conversation, with internet research, Spotify playlists, a history and the controversy of what is going on, it was totally decided we were all "Team Lamar".
And that is how I get out of slumps. I don't stop living because I have become a bit fat from time to time. And once I am feeding my brain and body again, walking errards you would usually take the car, or doing the housework AND lunging, working out at the same time, then you get back on the treadmill, then for a jog outside, then cycling to the local lake. Because how you actually look is way far down the list on the actual amazing beauty of what your brain and body can do and the love and happiness you have with your children and spouse.