Dialogue With Thoughts

I have been a scholar for three months and have tried to lose weight with your stop overeating program as well as the urge jar.
So far I was not successful and while I learned a lot on how my mind works, what my brain is biased for, and what are the steps I should take, I fall short when it’s time to execute.

I understand the biased reason why my brain prefers sugary and flour-based foods. And I also understand that my brain prefers to repeat efficient habits that were practiced for years.

Over the last two months I got really good at making a protocol for myself, writing down each night what I will eat the next day, making focus thoughts list and error thoughts list, and expecting the urges.
Then the morning comes. The urges are there in full force. And I obey them each time.
The way it goes is I would have a thought of ‘I want this.’
It will cause a feeling of desire for me.
Then I will have a new thought ‘But I’m not supposed to eat it. I said I will not eat these foods anymore.’
This thought causes me to feel frustrated and like I am missing out.
So either of these models lead me to overeat in the action line.

So I thought maybe both of these thoughts are not useful for me.
One creates over-desire, which if I will act on, will lead me to overeat.
And the other creates disappointment for me, which leads me to overeat.

But I have been thinking these two thoughts for so long, I cannot prevent them from coming up.

What dialogue should I have with these thoughts?