Half is better than whole

I got up and went to work. I finished a good chunk of my science homework. I took care of some cats for a pettsitting job. I turned in a 1500 word essay. All these tasks took more motivation than I thought I had. I should feel satisfied because it was a productive day. 
But all I can think about is the food I should not have eaten. Tonight I snacked from when I got home until 9:00pm. That is four hours of going back and forth to the fridge like an ant foraging for food. Instead of a whole container of ice cream I had half...does that count as success? Tonight it's going to have to or else I will fall down the hole of disgust and self condemnation.