this is just me, so don't take this the wrong way, but i think you might need to consider moving on.... there's only so much that you can do, and if you're both miserable staying together, and you can't work through it, it might be time to seriously consider ending the relationship.
you can still be her friend if you feel that she needs your support, but she can not be a supportive mate to you in her current state. what about your needs? how much longer can you continue giving without your needs being addressed? sooner or later something has got to give, and if you wait until that time, the inevitable breakup will be far messier than if you end it now...
i know that's probably not what you want to hear, but if she is unwilling to take steps to pull herself out of this funk then you need to do what is best for you. if you continue with things as you described, she will likely pull you down with her. it sounds like you really care for her a lot, and that makes it all the more difficult, to be sure... but how long has this been going on? how long are you going to suffer, holding on to the hope that some day she'll change?
don't love someone for who they might be in future, love them for who they are right now, because there are no assurances that they will ever change.... people rarely do...
my wife of four years displayed some similar symptoms to what you're describing with your girlfriend... in the end, i had to leave her because she was incapable or unwilling to do what she needed to do become whole again. it was the hardest thing i've ever had to do, but i couldn't live my life waiting for her to come around....
however, the other possibility that comes to mind is that she is unhappy with your relationship for whatever reason, and this is how it's manifesting. i've seen girls act like this before, and many times it's because they're about to break up with you or they are trying to push you into breaking up with them. this behavior is also common with girls who are cheating, and is just a way to emotionally distance themselves from the people they are hurting and avoid the associated guilt...
sorry to be so negative, i'd like to tell you to hold out and keep plugging away, but it sounds like this has been going on for a while now and you're at your wits end...
this is all just my two cents, take it or leave it, it matters not to me... the only reason i felt compelled to weigh in on this is because it sounds so similar to my relationship with my wife. i know the situation is not the same, and that there's lots going on that i can't know about just from one post, but this is my advice from the information i have....