Period returned after 9 months...

Samantha
Hello,
Back in January of 2014, accompanying healthy (and slow) weight loss, I lost my period. I remained amenorrheic for several months following & have only now gotten it back. Each doctor told me this loss of menstruation was OK, & that it was normal for me.
The thing is, for the past two weeks or so, I have been binging on unhealthy foods. Loads of cookies, candy bars, and order-in pizza. I've been consistently sick, experiencing extreme bloat and depression. I'm eating, at least, 3,800 calories a day. Being that I'm 19, 5'1, and weight 107 pounds, this is a lot of food. I actually weighed 102lbs prior to this uncontrollable gorging.
Was the loss of my period due to calorie restriction? And if so, how should I get myself back to maintaining a healthy lifestyle without unintentionally starving myself? (Suggestions?)
Thanks.