Once you figure it out, you can develop a proper plan of action. If it's a habit, your plan should consist of how to break the chain of actions or events that ultimately lead up to the binge. Like if you return home from school, you always set down your bag in your room, go to the bathroom, wander into the kitchen, open up the cabinets, and then start munching away -- you can break it by making a plan to stay in your room, or avoid the kitchen by watching TV in the living room, or play a video game or read a book. Basically, set up a semi-specific plan like "after I go to the bathroom, I will read a book in my room for an hour." and practice following it. You replace one habit with another.
If it's emotional, same thing. "If I am feeling frustrated, then I will go for a walk outside." or "If I am frustrated, then I will listen to music." Create a "If I am feeling [emotion], then I will [action]."
2. Plan strategic eating times. People who are restricting are still eating every day. When people create "strict" eating rules, they are less likely to slip up. If it is a too strict of a rule, you will feel overwhelmed and think "screw it" and binge at the moment of weakness. If you can't do 600 Calories right away, then do 900. 900 is too hard? then 1200. Decide what food options ARE able to be eaten, like peanut butter on toast, an apple, or an egg for breakfast so if one option isn't available, you have a back-up plan.
The "strategic eating plan" would also include what to do in case you can't stick to your regular routine. Family decides to eat out? Friend offers you cake? You're too busy to eat lunch one day? Have a plan for each scenario. Mentally imagine yourself doing the actions to assess if it is plausible or if you feel like it would be too hard. Revise them if they fail. Assess WHY they didn't work, and think creative and practical ways to address the failure. Family eating out at favorite restaurant? eat an apple before you leave so your hunger signals are suppressed and you have more will to avoid binging on your favorite dish.
3. Start off easy. The biggest mistake people make is when they think "I'll jump right into eating 300 Calories every day and exercising 500 Calories and do this until I lose 20 pounds!" They have such high expectations, and their "plan" is way too vague to actually work. What food will you eat? When will you eat? What exercises? When? What are your backup options? How will you assess if this is working? What will you do when you start feeling overwhelmed? What's that backup?
If right now you are eating 200 calories and binging/purging on 2000, that's a sign that you made a too difficult calorie goal. Try a different goal where you eat more throughout the day, like 1000 calories, and your binge urges will be smaller. THEY WILL NOT COMPLETELY GO AWAY, BUT THE URGES WILL BE WEAKER SO THAT YOUR "IF-THEN" PLANS WILL BE RELATIVELY EASIER TO FOLLOW. The goal is to make those "if-then" plans a HABIT. If your plans are well crafted, they will prevent most, if not all, binging and purging.
4. This does take time. The arbitrary "three weeks to form a habit" is bullshit. You can develop a habit in five days. You can take two months to develop a habit. It's all on how much change is needed to form the new habit, and how automatic the bad habit you are trying to break is.
This builds off number 1. You need to know the ins and outs of the habit you are trying to break so you can make changes that take as little effort as possible. Want to exercise in the morning, but have a tough time getting up to actually do it? learn WHY you don't want to get up. Is it because you hate grabbing your shoes across your room? put them beside your bed so you step on them when you get out from under the covers. Is it the pain of putting on a sports bra? wear that bra when you go to sleep. Little changes like that can make a world of a difference, but you NEED to know what you have to change.
This is the rough version. I will make it easier to read when I have a chance.