That is such a F***ed up state of affairs!!!
I utterly hate how stupid girls can be like that... I've had the same sort of thing happen, it makes you feel like you mean nothing at all to them, when they say they "like" you too, but wont be with you, then go off and f*** someone else.
Ugh... I usually, even if I love the girl, give up and run like hell. It's insensitive, but they've been far more out of order to act so stupid and selfish. I don't like it that we guys have to just take such stuff in our stride and forgive them, but if you'd went off and had sex with someone else they'd hate you and you'd never have a chance with them.
Anyway... If you can forgive her utter utter retardation then be her friend for now. Console her and make sure everything is okay. Make sure she knows you will always be there for her, whatever she needs, whatever is wrong. Find out the whole and total problem with her and try to help her through it. You may have to put in another 6 months of work here to be completely sure everything is fine and even then there is no way of being sure she doesn't just completely completely think of you as a friend and nothing more.
I pity anyone that gets like this... hmm... If a moment comes up during the consoling period where she then wants you, if you don't do something because she's being crazy she could take a step back and get worse and come to not like you, or that could happen for a little bit, then when she's better she'll understand why you did it, but will think of you as a realllllllly good friend, nothing more, or the former could happen, but she respects you more for it.
Or you take action if an opportunity arises and she then freaks instantly.
Or she doesn't freak and it makes things better for her for a time because the extra atttention makes her feel wanted and loved, but later she'll hate you for taking advantage.
Or she accepts your advances and nothing bad ever comes from it and you make her better faster and have a long happy time together as more than friends, you could feel bad that you took advantage of the situation, that you got her on a crazy patch, sort of reboundy, and you could get all crazy from that and cause problems, or feel resentful.
I'd say if you feel disgusted by her actions now there is the possibility that it could happen again while you're with her, and no one is worth that much pain. Be her friend, make her better, but give up on her and fall for someone else.
If what she's done doesn't bother you and you want her, love her, that much, then do all you can to make her better and only approach the subject of your love for her when she's better. Don't get angry and bring up any of this crap that's she's done, it will lock you out forever, just be there, be kind, put up with it, then go for it when things are okay.