After over a decade of yo/yo dieting and unhealthy eating patterns culminating in a severe eating disorder, I had to completely stop trying to restrict my food intake in order to recover.
I now don't diet, and I eat what I want, and I've maintained the same weight for the last year. I'm a size 10-12 - by no means as slim as I would like to be, but I haven't continued to gain weight either.
For me the biggest turning point was that by allowing myself to have whatever kind of food I wanted and as much as I wanted, it took away the power that had for me to want to overeat. It's now easy for me to turn down a biscuit if I'm not actually hungry, or have a few crisps but not the whole bag.
But you do have to be aware of your hunger levels and listen to your body for what you actually want, not what you think you want - I would describe it as eating mindfully - not restricting yourself, but being very aware of what you're eating and how hungry you feel and when you've had enough. I read some books too - How to have your cake and your skinny jeans too - is quite a good one.
It is a complete mindset change and it's not easy. And to be honest, I think you have to get rid of the 'diet goal' in order to do it. I had to let go of the idea that I could be a size 8, because although I can, I know now that I can only achieve it with restrictive dieting that isn't healthy or sustainable. It was HARD to give up on that aspiration. But it's incredibly liberating now not to have my headspace taken up all the time with what I am eating or not eating and feeling guilty for every choice I make and worrying about a number on the scales.