When I need to get back on the wagon I go back and do research, try to remember what you did like and make a plan! Plan all your food for the whole week on Sunday (that is when I have time), and make sure to plan some activities for the time of the day you know you will be looking for a snack for no good reason!
Once the research and plan is done take it day by day. If I get overly consumed with having to deal with my eating plan all week I go crazy! So I just try to stick to the present even meal by meal....
It sounds as though it's been a long time since you've been in to your surgery practice. Most people *****gain a lot feel too humiliated to make an appt, but I think it's one of the first and wisest steps to reacquaint and reconnect. They've heard it all before and, when someone recommits, they'll be there to help you succeed.
Use a food tracker (My Fitness Pal; sparkpeople.com; livestrong.com are among them). Not only will it help you stay aware of what you're putting in your mouth, it will also be a great reference so that you can take a hard look should you go astray. I also find that the little time I spend using mine (spark, but that's not an endorsement), is time that I'm not eating.
If your memory or confidence is shaky on the how-to's and what-to's of choosing foods, see your practice's RD with about a week's worth of food diaries to review together. The RD will be able to point out areas that my need improvement.
I've been there and am still working on undoing the damage. You can do it.