You need to sort out your end game and then be honest with yourself and her about it. If you want to be her friend, just be her friend. If you want to have some sort of relationship, good luck, she sounds like a bit of a mess at the moment.
Are you attracted to her because she is attractive (physically, mentally, whatever) or are you attracted to her because she is...and this sounds pretty mean, but just trying to get you to be honest with yourself...low hanging fruit.
Whatever you sort out, I would strongly caution against a relationship started under the guise of helping her or protecting her or whatever the case may be. Eventually you will tire of trying to fix her situation OR she will get better, the distraction of something to fix won't be there, and then you'll have to figure out an actual relationship with a lot of history that she will probably want to forget.
My advice is be the girls friend and absolutely nothing more. Don't even be flirty with her. In fact, find a girlfriend so you can be her friend with no pressure to advance the friendship.