Aaahhh don't beat yourself up!! It's all a learning process right? It's just food! At least you didn't have a burger.
I would hasten a guess that you are not eating enough calories, and that you're not getting enough sweet fruit in the morning and lunch, so I'd check that a) you're having enough fruit during the day as per the guidelines, b) that the fruit is ripe, and c) that it's what you're in the mood for
I recommend super sweet fruit like dates. After I eat a mono meal of medjool dates (soooooo deelish) I don't crave anything sweet for the rest of the day. Except more dates maybe! Ripe bananas are also good. A banana shake with water/coco water, bananas, vanilla extract (optional) and cacao powder is like a good choco hit too!
In terms of bingeing/falling off the wagon, you might want to stock up on your fave RT4-friendly (or at least vegan) snacks/meals so you have something to fall back on if you have the same problem (but I reckon eating more sweet stuff as above will sort you out!)