Halloween Candy Guilt

I thought I had my urges under control. Then the kids were all eating candy and my daughter didn’t want to finish half of hers so I had a thought malfunction and listened to it. That didn’t seem like a big deal last night but today I ate 3 more chocolates while kids were at school. I’m so disappointed in myself and digging myself deeper and deeper. I’m also sleep deprived from my toddler waking up a bunch so feel like I’m losing my mind. How do I get myself out of this slump? Thanks!!