I think the best thing that I read about dealing with this is calling it a "U-Turn".
We all do this - have a great diet, and then completely fall off the wagon. I recently fell off my diet for about two months straight.
But you have to first forgive yourself, and then second tell yourself you're going to make a U-Turn, and get back on your diet.
There's nothing you can do about the food you've already eaten. You just have to remind yourself that all is not lost because of what you've already done.
Pick yourself up, dust yourself off, and get back on track.