Help. I lost control.

I went to a social gathering and didn't realize it was centered around desserts. I used to struggle with eating disorders but I've been doing so well for the past seven and a half months since I got pregnant because I want my baby to be healthy. I have made sure to stay away from sweets and have them only occasionally. Tonight I saw the desserts and ate a bit of nearly everything. It all looked so good and I just couldn't control myself. I didn't feel bad about what I was eating until I left.. Now I feel like a shitty mom and my baby isn't even born yet. I feel like I've failed and I want to throw up so that I get the sweets out of my body.