I can only tell you want friends, strangers and family have done for me - which has got me this far.
Do's
Listen to her.
Let her cry. And cry, and cry.
Let her re-tell the stories time and time again - it's part of the processing.
Go for walks with her, or other activities which get her out the house - a long drive, a visit to a nice place. Just be around and keep the invites up.
Remind her why you're her friend - what you find likeable, admirable, interesting about her - her self esteem is through the floor right now.
Tell her why other people like her (ditto).
Do some baby sitting for her if you can, so she can get out and do things she needs/wants to do, or just sleep - sleeplessness is par for the course right now.
And listen to her. And then listen some more.
Don'ts.
Don't slag him off (by extension you are slagging her off her life choices)
Don't tell her what to do - this really riled me at one point as I felt that the biggest decision of my life had been taken for me and I was suffering the consequences. I most definitely did not want other people making decisions for me.
Don't try to fix her - right now, time is the only healer.
Don't tell her what to think. It truly is the time of you life where your point of view changes every five minutes from despair, to self-pity, to anger, to fury, to panic, to despair again. Every five minutes! It's exhausting.
I've said time and time again in recent weeks that people are amazingly brilliant during tough times - and people I barely knew have been utterly generous with time and support, the only positive thing to have come out of this. Since you've asked for help on how to be a friend - that makes you a marvellous person for her to have on her team right now. Well done you!
PS I found a solicitor on Team WellWhoKnew a vital member as well. I did try counselling but it didn't help me initially. I've just admitted I need more help, so found another counsellor who seems more suitable for me. So don't see it as the be-all and end-all - it may or may not be helpful.