Recently had back surgery

Options

hello I was doing great for a solid year I was fasting 16 hrs a day and it was effective working out. Until Nov my back was getting worse so I had to lighten up on working out. Then depression kick in from everything happening then I quit fasting and then in Feb I had back surgery. So I gained back 20lbs now I’m scared I will gain it all back unless I figure how to get control of this. Still recovering from surgery no pain just weakness still and I know it’s gonna talk time. I need help with getting the eating back to how it was but the motivation isn’t there. I’ve done this before I have lost motivation when I first injured my back. Does anyone have suggestions? I need to keep the weight off I can’t gain it all back. 😫