how to not agree with a thought and not resist it at the same time …

I don’t quite get how to not agree with a thought and not resist it at the same time …
Example “I should have not eaten this” – How do you accept the thought without pushing it away (cause it comes back stronger and more powerful) but at the same time not agreeing with it, yes it was off plan and you should not have eaten it.
One of my thought is that I need to accept and agree with myself that I should not have done it in order to progress .. Do you have alternative thoughts to offer on this ?

Also I know you said we should never use our objectives or our goals to beat ourselves up, but how do you find the balance between pushing yourself to achieve goals vs “love yourself no matter what”
I have always done what I say and said what I do, I have no problem keeping plan and “forcing” myself to do what I said I would but it has always been in a “if you don’t do it you’re not good enough” kind of way and I’d like to shift to a more loving, accepting who I am, peaceful way to achieve the same.

2 of my objectives for my time at home is to “love myself no matter what” and “stop buffering” – When I buffer, the first thought that comes to my mind is “you should not have done this” and then I think “see, you’re not loving yourself here”.
How do I accept the “I should not have done this” without resisting it trying to love myself no matter what
Does this make sense ?

Thanks for your help