I think there are many ways of viewing overeating:
1) You get a high/intoxication from sugar and fat. I know I have it like that. Instead try to make interesting and healthy food. I know that if I eat very boring meals I feel like experiencing something interesting by eating chocolate. It takes time to make a proper meal, but might be worth it. Most smoothies with berries and oatmeal. It is delicious and low in calories. A lot of vegetables and fruits are also delicicious like carrots, cabbage, orange and grapefruit.
2) You get a hig/intoxication from sugar and fat, instead of taking care of your other non-food related needs. Loneliness, lack of friends, working too much, little romantic acitivity, non-meaningful job, all of this can increase the impulse of wanting to escape reality by eating chocolate/pizza/chips or similar stuff.
3) Accept that intoxication from alcohol, drugs and sugar is not that easily obtained from more adult activities. Rather give up on chasing highs and rather go for satisfaction. Satisfaction are milder pleasure that you can get from achieving goals, hanging out with good friends, finishing a good book, learning a new language etc etc.
4) Maybe you have troubles seeing the world realistic. Maybe you have an overly pessimistic view about yourself, women, men, your body, the political situation etc etc. In this is so maybe going to a good and experienced psychologist can help.
5) You can try to get your highs from other non-food related stuff like ice-bathing.
6) You can try to get easy, comfortable pleasure from other non-food related activities like for instance certain TV-series. Watching Poirot always sets me in a good mood. The same with doing yoga and meditation.
Hope this helps.