Had a bit of a setback

I had 700+ calories left so I ate a banana. Then I ate a carrot slice. I couldn't find the calories for it ANYWHERE. I even called them up, but they said they'll get back to me tomorrow. Then I ate three chocolate and nut bars AND two chocolate banana chips.
It was scary. I felt out of control and scared. I went to bring my boyfriend some food and walking down the road, I just wanted to cry. I felt hopeless, like I can't do this.
I'm trying to stay positive, but I feel like my confidence has been knocked a little. My cals are still under my daily allowance (although I don't know how much cals the carrot cake was), but it's the lack of control and negative feelings that scared the bejeebers out of me.
Need some words of encouragement right now.