Need motivation!! Get back to working out after surgery?!!

Hi everyone!
I had a surgery end of Feb a few months ago! a gall bladder removal!
I started working out last June, and used to workout every single day and it felt soo good! I had discipline when it came to eating... taking care of macros and watching my calories and lost 42lbs! After the surgery I needed a lot of time to recover.. but now I just feel like a bum and I think Im depressed... Im eating all bad junk food... I gained like 12 lbs sand Im freaking out that I might gain the weight back and never be able to get back to my regimen! I really thought that by this summer Im gonna be a lot smaller and feeling better than ever... but all I feel right now is NO energy... I have no self control when it comes to foods! and I cant get myself to go workout like I did before!

I go like once or twice a week and be on a good diet for a few days and then I collapse and get back to junking and being lazy :( .... and I don't deprive myself when Im on track I eat about 1700-1800 calories a day 45% cabs, 30% protein and 25% fat

Please help I don't know what to do and how to motivate myself to get back to it and stay on track!