I've been there. It's difficult to get out of that mindset...especially at first. You've spent years thinking food was bad and depriving your body. You've been fighting with your body. At some point, you have to decide to fight for your body instead of against it.
It's a fine line-- the line between being gentle with yourself when you slip up on a diet and being so lax that you can't stick to one at all. Try to rethink the word diet. A diet doesn't have to be about depriving, it really shouldn't be. A healthy balanced diet means that you're actually eating...and the consequence of that is nourishing your muscle if you're eating right. If you baby your muscles, giving them adequate protein and healthy fats, they'll repay you by becoming your own calorie furnace. If you baby your lean mass, it will consume fat calories even when you're at rest. A funny thing happened to me, I almost tripled my daily calorie intake (I was eating WAY too little for WAY too long...my body held onto every calorie) and I got smaller. If you teach your body that you're going to take care of it and feed it on a regular basis, it will eventually stop being in starvation mode. When you are depriving yourself of nutrition your body is in a panic all the time. It has to hold onto every bit of everything and store it as fat (your body's calorie bank) because you've taught your tissue that you aren't going to be consistent with it. Your body is always looking out for itself.
Restricting your food intake or purging will not benefit your goals in the long run. I certainly know it's the 1st solution that comes to mind when something goes wrong though. But that doesn't mean it's okay to just cave in. It also might help to pay attention to what is triggering you to want to engage in those behaviors. Fat isn't a feeling. If you're engaging in ed behavior because you feel fat, pick that apart. At least for me "feeling fat" usually means I'm feeling insecure, sad, bummed out, frustrated, etc. Then go the next step-- what will purging/restricting actually do to make you feel better? It's a very very quick "fix" that does more harm than good but the guilt will set in a little later and the pain you felt before will still be there. Not to say in any way that it's not hard to stop, but life is so much better once you're able to.
www.sfwed.org has a great message board that might help you sort out your feelings without thinking of #'s. Nobody can or should judge themselves numerically. #'s are #'s. Cut the tags out of your clothes. It can help. You're more than a number, a weight, a body fat percentage, a daily calorie intake.
Read a lot around here. Read about what your body needs to look/perform optimally. I joined this place utterly clueless about diet. I wasn't eating enough protein, I wasn't eating enough fat, I wasn't eating enough in general and as a result, I was not physically where I wanted to be. Take the urges that the eating disorder gives you to engage in that behavior and put those compulsions towards something good. Go to a site like fitday.com and be honest with yourself. Set up a diet where you're eating smaller meals every 2-3 hours. Stick to it. Make sure you're eating enough. And know that things like chocolate cake happen sometimes. You don't have to purge it. It's a piece of cake. As long as it's an occasional treat, it's fine. For me scheduling in a Sunday cheat meal keeps me on track all week. Especially at first, if you're depriving yourself of everything, you're going to have a heck of a time sticking to what you're doing.
Ask questions. Read. Take notes if you have to (I did..I was clueless). Try to look at fitness magazines and other imagines of healthy athletic bodies instead of sickly thin model types. Change what you view as ideal.
I promise you that you'll be floored in multiple ways if you baby your body, feed it properly, are gentle with yourself, and train well at the gym. You gain self confidence, you feel more in control of your life, and your body will start transforming too because it learns that you're trying to help it. Welcome and I hope you find what you're looking for here.