I didn't eat something unhealthy today, but some days it happens. Try not to overreact when it does -- just track it and move on. You'll get the hang of making better choices.
The important thing for now is just to not let this derail you, or make you feel miserable. You want to do better -- so next time, do better! Every time you succeed in overcoming temptation, you get a little stronger, a little better at it.
Believe it or not, someday it won't even be hard to say no to a donut, because you won't even want it. I still like to have a treat every now and then, but I try to do it only on my terms -- because I planned to, not because someone happened to bring donuts to the office one day. It took some practice to get here -- and believe me, when I started out I was anything but perfect!