Why do I always overeat for a full day before getting back on track?

Yesterday I asked about feeling out of control with eating.

SCS replied with this: Take a moment to answer your own question: Why do you still take a full day to get back on track?
Stop and listen intently to yourself.

So I thought about it and here is what I came up with:
When I overeat, it typically becomes a full day of overeating. I think the thought in my head is something like this: “this is my chance! I already blew it today. The day is ruined (in terms of trusting myself around food). And so since the floodgates are already open, this is my chance to get it all in! All the foods I don’t usually eat! Go for it!”
I think this is a result of dieting for 30 years. But I don’t like those thoughts and I want to change them. How can I do this? These thoughts feel old and outdated bc most days, I’m able to eat foods/amounts that make me feel good. Just like 1-2x/week, I have the out of control food thoughts that turn into a full day of overeating. this isnt the person i want to be anymore! It’s keeping me stuck and I want to move forward. How can I stop letting these old thoughts get the best of me?