Yes, the psychological aspects of this are very complicated. I think part of the solution is recognizing you have a problem, and not being too hard on yourself for doing weird things. For example, I give myself permission to bring home lots of leftovers when I eat out. That way I don't feel like I'm wasting anything, or not getting my full meal -- even though I usually end up throwing most of it away!!
I also still over-buy at the supermarket. But I give myself permission to throw it away if I haven't eaten it in a week or so.
And don't feel like you can Never have certain foods again. Give yourself permission to eat one or two bites, and then give yourself permission to throw the rest away. Interestingly, it's the second part that's harder!
I am learning to give myself permission to "waste" food, if you will. It seems that was something drilled into me that I have to slowly unravel. Of course, trigger foods are another story. But even then, remember, it's like exercise: it's not doing 3 hours of treadmill on a particular day that counts, but doing one hour every day that makes a difference.