Do the unselfish thing and don't be her friend or her boyfriend but do tell her before you cut all contact with her that you hope she has the strength to get the councelling that she needs to become healthy.
You can't help her by being in her life. She's told you she wants you gone but she's too weak to keep gone herself. You be the smart, unselfish one by clearing out so that she can concentrate on her own love of self to the point that she isn't screwing with men's head the way she is with yours. She is in no shape to be entertaining any type of emotional relationship at the moment (not even with herself) so leave her alone and get on with your pursuit of a LIFEmate that isn't needing to be fixed.
If you love yourself at all, then you'll see the beauty in all these replies.
“The willingness to accept responsibility for one’s own life is the source from which self-respect springs.” ~Joan Didion