Ditto on all the advice everyone has given so far.
I dealt with a pretty terrible relationship this past semester. My friends all hated the kid, which I can't really blame them, cuz they listened to me b*tch about him hurting me so much. All I can say is, it really depends on the situation. If I was in a "I hate him so much" right now kinda mood, it was nice and pretty funny to have my friends rattle off his flaws to me. As mean as it may sound, once you knock him down off the pedastal he's been put on, it really can help.
However, for the most part, I really just wanted my friends to listen. And make sure she knows that you aren't judging her, and you aren't getting tired of hearing about it (even though you may be). If you don't live with the girl, invite her over to your place or to go out whenever she feels like it, and let her know she's welcome to drop by whenever she can. Pretty much overall just be there for her whenever she needs you, night or day.
Also, and this is kinda a touchy subject, but if you're friends with the ex, steer clear of him for awhile, especially around her. The last thing she needs to be worrying about is that the two of you are discussing the breakup, or worse, flirting (cuz she will probably blow the situation out of proportion). And if you and the ex are pretty good friends, and you do still talk, do NOT mention him to her, even if it's something like, "Oh he seems really upset about the breakup."
Good luck!!