No one has responded to this post in awhile, but just came across it and figured I probably should say something.
My heart really goes out to you, and I can actually relate quite a bit.
I was diagnosed with ulcerative colitis when I was 14, and developed anorexia around the same time (though no one knew then...except for me).
I had an emergency colectomy performed when I was a senior in high school. As I was a senior in high school, I was pretty eager to get the ileostomy reversed, but any attempt at reversal resulted in multiple complications and more surgeries.
So, long story short, it has taken me a very long time to (1) make peace with having an ileostomy, even though it saved my life; and (2) to seek out help for the eating disorder, learn how to give my body what it needs, and be okay with doing so. Oh, and yes, I also dealt with a lot of depression along the way.
While it hasn't been easy, I'd say I'm in a relatively good and stable place now - so hopefully that gives you some reassurance that it is possible!
Re: the nutritional side of things, hopefully once you've recovered from the surgery you'll be able to introduce things back into your diet and get back to eating relatively normally. I'll eat anything now (literally), though I am extra careful about a short list of things (popcorn, mushrooms, cooked spinach, corn, oranges, apple peel...I'll still eat all of those things, just limit quantities and chew well!). Given your history, I'd be extra careful about trying to eat perfectly for the ostomy. The vast majority of ostomates find that there are actually very few things that they can't eat. One thing that I have found to be helpful (both with regards to the eating disorder and the ostomy bag), is to include starch/protein/fat at every meal, and to still eat fruits/veggies, etc but make sure to pair them with something more easily digestible (like a starch) and to not make them the majority of my meal. So for example, if I was served a main dish salad for dinner, I'd make sure to not take a huge portion of salad, and to pair it with a couple of slices of bread w/ butter or olive oil.
Also, this is hopefully obvious and maybe you're already doing it, but if you can see a good counselor who has experience with eating disorders, I'd recommend it even if you aren't actively struggling at the moment. Adjusting to the ostomy is a lot for anyone, let alone someone with a history of an eating disorder. I've also found a specialist eating disorder dietitian to be quite helpful, though I know a good one can be hard to find.
Hang in there! I hope you're doing okay.