It is so hard, I know. Hugs. Don't be so hard on yourself. If you don't do that again for a week or two, those 1000calories won't cause you to gain weight. It will though if you continue to binge.
It sounds to me like you are limiting your calories too much. If you are at a point where you can't stop yourself from snacking and feeling hungry, you are probably restricting yourself too much.
Try adding another 100 calories to your lunchtime meal. Or use some of your dinner calories for an afternoon snack each day. And drink lots of water while you are eating!
An extra 100 calories per day will cause you to lose weight more slowly but it won't be as hard and you won't binge as much.
Oh, a trick my dietician told me about. If you get to a point again where you can't stop eating cookies, stop yourself and make a sandwich. It can be a ham or pbj sandwich but it right then. A sandwich is filling and generaly has protein that will satiate you longer. Plus, a simple ham or pbj sandwich only has about 300 calories where as it only takes 3 small cookies to reach that amount. Better to stop the binge with a sandwich than to possibly keep snacking.
"It is not 'progressive' to try to resolve problems by eliminating a human life." Pope Francis