I had gastric bypass surgery around 6 years ago and I am very pleased with the results. It is sort of like the gold standard for bariatric surgery. They have most of the bugs worked out. Mini-gastric bypass is somewhat new so I can not really assess it.
In general, many people try various kinds of diets prior to eventually getting gastric bypass surgery. Most of the time these are referred to as yo-yo diets. Because the individuals will lose some weight but then over time give up the diet and then gain the weight back and then some. So it is like a yo-yo. In your case it went to the extreme and you slid into anorexia. So the only advise here is that the psychological treatment component is very important for you for the surgery to work. (the package with the 12 phycologist sessions). Also if things go south sometimes after surgery then reactivate the physiological component.
The three most important elements after gastric bypass surgery are to meet your daily protein, fluid and vitamin requirements. Food is secondary because your body is converting your stored fat into the energy that drives your body. Thus you lose weight.