I always say to myself if it smells nice 'well that smells good but so do flowers and we don't eat those'. Substitute something else that smells good if you like - cut grass, creosote, babies.
I also borrow my friends crisp packets (for example) and have a good old sniff then give them back!
Have no idea why this helps, but it does. And I have to keep reminding myself of my choices...they're mine, nobody elses, there's no point arguing with myself about them. I choose to do this as I choose to lose weight - if I choose to eat, then that's fine, but that also means I consciously choose to stay on the diet for longer than I would otherwise have had to. Hmmmmmm - quite easy to say no, I find!
Banning the word 'can't' also helps me...I never say 'I can't have that' I say something like 'thats nice but not right now' or 'thanks, but I dont' think I will' - something that makes it less of a denial.