Ah the emotional crutch man, I was nearly that once. Never let it happen, kept her as a friend and ran away (aka. gracefully exited the premises or drew a line) when things got risky, but I can see how it happens. She pretty much hated her boyfriend and it was a rather dysfunctional relationship (she had problems, he had problems, the personalities mashed together in a horrible (but often entertaining-to-watch) way).
I say if you can run away (aka. graceful exit or draw line), keep her as friend but cut off all snugglebuddieness and don't let any emotional manipulation get in the way (or your emotions manipulate you). It's better and easier in the long run for you, less pain all around and to be honest the "pleasure"/entertainment won't be worth the pain unless you're already a detached individual (like I was back then, which is not a good way to be fyi) who won't feel that pain on a deep enough level for it to matter. Although there is the risk the alternating affection/rejection could drive her a little bit insane in all manner of ways. And I guess it costs you some emotional fulfilment/happiness too.
But I'm aware most people aren't as detached or emotionally distant as I was (hey, we all have issues. I'm better than I was back). Also being rather asexual probably helped, less background noise to get in the way of acting. If not able to or doubt your ability to effectively manage the situation, I prescribe 50CC of cut her out of your life. Painful but effective, like chemotherapy. Eventually she'll just become somebody that you used to know and her pains and plights will mean nothing to you. A harsh but true fact of life.