That's the problem. Not giving yourself an adequate amount of calories and macros is a sure way to burn yourself, especially if you lift. A routine is necessary to avoid binging, eating multiple meals around the clock, similar times each day if possible. Going on a diet usually implies a short, set time in which you are in a calorie deficit, which just hurts your body and makes you crave like crazy because it needs certain nutrients. If you're someone who overthinks a lot like me, you negative self-talk yourself so much you end up eating the thing you were mentally trying to talk yourself out of. I know I eat the most sugary crap when I'm depressed, because sugars release hormones that temporarily make you feel better. My advice is deal with your mental issues.