Habits are the mind’s way of establishing a behavior without having to think about it. On a cellular level, it comes down to your brain chemical: dopamine. Dopamine teaches your brain what you want and then drives you to get it, regardless of whether it’s actually good for you or not.
So, to break the cycle of bad habits, you need to reset your dopamine cycles. How? Give yourself robust rewards for eating healthy foods instead of unhealthy ones, like a weekly shopping trip or a manicure, or anything that’s not destructive. Soon the pathways of bad habits will disappear.