Beating yourself up won’t solve anything.
One of my first and foremost beliefs when it comes to food is that it is meant to be enjoyed. New and interesting tastes deserve to be experienced by everyone. The downside to trying to enjoy all your food, though, is that you may not always eat things that are good for you. It’s true, things like sweets and fried food aren’t good for you, and if you want to be healthy 24/7, you have to work toward that. But while eating nothing but raw vegetables and protein paste will get you your nutrition, it’s just kind of a boring way to live.
You should eat something that you enjoy because you enjoy it. If you’re really into raw vegetables and protein paste, great, you do you! Me, I can’t live without chocolate. When I want some chocolate, I have some chocolate. There’s this mentality that a worrying number of people have adopted that every tasty food must be repented for. You eat one cookie, and you act like your whole body’s been thrown out of whack, so you either pile on the healthy food or force yourself into exercising it all off at once. That’s a great way to turn yourself into a binge/purger, and that’s an even more unhealthy way to live than having the occasional brownie.
What you need to do is listen to your body, not your brain. When you’re craving something, just eat it. Then you won’t want it anymore. Unless you have a genuine medical reason to do so, there’s no point to counting calories beyond needlessly punishing yourself for being human. Maybe you’ll gain a little bit of weight, but if your body needs you to change something, trust me, it’ll let you know. Food doesn’t need to be a pointless, ephemeral thing. Let your food be a source of joy in your life.