You just have to keep trying. If you have a bad meal or an extra piece of cake, don't despair. Just make sure your next meal is healthier. This is a lifelong process, so you will have your good days and your bad days...just like with everything else in life.
You don't have to be perfect, you just have to keep trying!