My advice is don't give advice.
Listen, don't judge and keep your opinions to yourself. It will help her enormously if she feels free to vent without you judging or advising her.
Arrange fun activities, go for a coffee, a walk, for a meal, things to take her mind off it. Have a laugh. People going through a divorce want to have fun too, even if they go home and cry afterwards.
Text her at night, something kind, let her know you are thinking of her.
Don't bad mouth her ex. That's her job! She might still have feelings for him. She might even one day get back with him (although hopefully not).
Ask her questions, rather than give advice. That way any decisions she makes she had made herself. My best friend asked me 'why do you want him back?'. That simple question was enough to wake me up and get me to a lawyer.
Be kind. Even if you think she is going about things the wrong way. Even if she is exasperating you. Take a deep breathe, don't get irritated and be kind. She will be feeling all kinds of emotions and may lash out at times.
Be someone she can rely on. Her H has let her down very badly. So if you arrange something, don't cancel at the last minute. On the flip side accept that she may sometimes cancel at the last minute. She may have some very dark days.
I'm sure you'll be a huge help. Have two friends who kept me sane, and left me laughing, and I am forever grateful.