For me, hurdles are entirely mental. If I'm on track, I don't need empty cupboards. (There's a half-eaten bar of chocolate right next to me. It's been there in the same half-eaten state for about a month. If I choose to have a piece of chocolate, it's there for me. But it doesn't call my name if I choose not to have one, either.) If I'm off track, empty cupboards are an excuse to go shopping.
On second thought, there's probably some physical component there. If I eat too much sugar and not enough protein, that feeds on itself, and makes it more likely that I'll keep eating more sugar and less protein. And too much sugar plus not enough protein makes me grumpy, which makes me more likely to choose to stay off-track. Doesn't make a bit of logical sense, because I feel better when I'm eating a more balanced diet. Sort of like being overtired and still staying up late. Which I also do.
The thing that works best for me is figuring out the emotional "why" behind things. Sometimes it's just 30+ years of bad habits, though - and that's a *much* easier situation to get back under control. I've historically snacked my way through tax season, with a bag of mini candy bars and a bag of M&Ms in my desk at all times. This year, I'm eating healthier food, and keep a bag of unsalted raw almonds on my desk. But I found myself thinking "Ooh, a dish of M&Ms would be great right now" this afternoon, and that was pure force of habit.