Opinions are really divided on this but I find the best defense against temptation to be... glucose. The more tubers, squash, chestnuts, green plantains and other fruit I eat the more indifferent I become to that stuff, and I certainly don't suffer mood swings or weight gain by doing so. Excessive restriction just makes food more exotic and powerful IMO.
As for slipups, I'd just make a brief note about future circumstances to avoid (mine = drinking at potlucks) then move on. The sin-and-repent head trip is no road to health.