I had a miscarraige once, and ended up the same as your girlfriend, its a horrible thing for a woman, you feel like a failure and start to pose all sorts of questions in your head, ie, if I had done this or that would I still be pregnant, can I have children, is there something wrong with me etc, it is a horrible feeling. It sounds like she is caught up in her own head, which is exactly what I done, please dont take it personally, its nothing to do with you, just how she is feeling inside! She may find it difficult to talk about it, so why dont you bring home a bottle of wine and share a few glasses together and talk about it, its easier to open up after a few glasses and you may start to understand whats going on more.
The reason why she seems alright when she goes out with friends, is she has a few bevvies and the misery turns into a blur, which is easier to cope with rather than the reality, the truth.
I dont think your relationship is breaking down, I think your girlfriend is, which is a shame, you really need to talk to her, reassure her and be there as you are already, maybe you should talk about your plans you both had and make steps to fullfill them, this alone will give her something else to focus on, rather than the misery she is feeling....I hope this is of some use to you, good luck