I had this dilemma too. I have an eating disorder and relapsed pretty badly this summer, and my doctor told me I either had to eat, or I had to stop taking my meds because they could give me seizures if I wasn't eating.
For a while, I chose to lose weight. It was all I wanted and I thought I would rather be thin and unhappy than not thin and stable (not necessarily happy).
But then I got through the relapse. I started taking my medicine again. We upped the dosage and now I am blissfully stable. For the first time in years, I am not deeply depressed or insanely manic. Now that I am here, I would not trade this feeling for being thin.
I understand though the anxiety that comes with gaining weight. As RedDawn said, maybe feeling stable will help that anxiety. I hope whatever you choose, it will be well for you and you are happy with your choice. And remember neither choice is permanent!