That's so hard isn't it and I know is something that I used to do too. I found though that if I could stay away from "temptation", then the results on the scales became worth it.
I've found too that the less "treats" and sugary things that you eat, the less you will crave. It takes time and willpower to do that... but is honestly worth it!
Remember though that one little slip up once in a while won't do any major damage... but just thinking "what the heck" for the rest of the day will and it could take days to undo that damage!!
No-one's perfect, but one thing that I've found really helpful is to fill in the diet calendar here. I've found it helps me stay accountable for every little mouthful I eat, both good and bad.
At least then you have a reasonable idea of how many calories you've eaten along with things like fat, carbs and protein content. So if you do "slip-up", you can then try and amend accordingly so that you don't do anymore damage.
A journey of a thousand miles must begin with a single step. ~ Lao-Tzu
Your visions will become clear only when you look into your heart.
Who looks outside, dreams... who looks inside, awakens. ~ Carl Gustav Jung