Hi Elly,
Welcome to the forum
I had a good friend who had a great loathing of two particular words - so much so that we referred to them as the 'C' word and the 'M' word. To give you a hint if you haven't yet guessed. One starts with 'c' and ends with 'ompromise'; the other starts with 'm' and ends with 'oderation'
I don't always like those words either, but I do know that it makes life a whole lot easier when we try to apply them. As I think you've discovered, doing things to excess rarely works for long.
As you say, the current binge eating behaviour (and it's not uncommon for a person to experience spells of over and under eating) seems to have been triggered by exam stress and depression/anxiety. So eating isn't really the problem at all.
Are you still at school now, and do they have a counselling service? That would be a good place to start because they know first hand the stress that a lot of young people face. Or a local youth centre, or even have a chat with your doctor. Anyone really who will understand and allow you to 'off-load' a bit.
And the previous restricting behaviour - while it's fine to aim for a normal healthy weight, when things start to get a bit out of control it's usually a sign of something much deeper.
Good luck with the exams, and remember... it is only an exam. Is it really a disaster if you don't pass them all? A bit of a set back - maybe. A disappointment - yes. But they can always be retaken again. Or maybe those subjects weren't really for you and there might be something better to study.
Take care,
Nigel