Best advice is to get back into contact with your therapist (if you saw one as part of your pre surgical process) or ask your team for a referral to one. They will help you work through the why behind your bad eating habits & help you develop strategies to manage when those situations (stress, anxiety, boredom, past issues, life in general, etc.) arise.
Then go back to how you were eating when you lost that 50lbs. You don’t need to go back to the very beginning. Meet those protein & fluid goals. Eat your protein first, then vegetables & only if you can any carbs you are allowed (look for whole or multi grain low prices see versions). Keep your fat & sugar (real, artificial or alternatives) low. Check your portions. Return to tracking if you did it before to check your getting your nutrients in. Maybe catch up with your dietician too to help you get back on track.
You can do this.