We've all been there, and we all slip up! Have you worked out why the snaccident happens? Is it hunger, or habit, or craving? Could you keep the snack in but swap it for a couple of pieces of fruit (boring I know), or kick it out and drink a litre of water instead? I had a rule at the start of the year that outside of meal times if I was hungry I had to drink a litre of water first. If I was still hungry after that I could have a snack - fruit, or a mini chocolate bar or something
Don't beat yourself up too much - discipline is great, but you're human too!