Listen, simply listen with all of your heart.
Let them know you care about them, treat it in some ways as a wake; it is the death of something as profound as a family member to many... Bring them food, make them comfortable, let them cry until no tears remain by convulse weeping, hug them, allow your love and concern to wash over them. Have them feel safe, be a stable beacon as they navigate the stormy waters.
Knowing the reason for the divorce can help too. If adultery, the victim can go from seemingly normal, to white hot rage, to levels of depression they might feel suicide is the only answer within seconds... And I can't blame them. Not only do they have to deal with the dissolution of something they never thought would happen, now it's that, financials, potential job loss by virtue of extreme sadness, concerns for the children, and a HUGE potential hit to their self-esteem, self-worth, and pulling a huge knife out of their heart and back.
Let them know that no matter how dark it seems now, no matter how difficult to exist in a world colored a painful shade of gray, it will pass. I know you mentioned a distance factor, but if all that the situation allows are calls, please make yourself available at all hours for what they might need. It's a hellish experience even with a "friendly" divorce; truly a never ending nightmare of being in a non consuming fire of pain, that seems endless. I'm not exaggerating.
Any one strand could cause a mental breakdown; all can lead to panic attacks, great losses of weight/dehydration, etc... In counseling circles it's called "the infidelity diet", and it's no joke. Might see if they are open to visiting a counselor/doctor to help them, and be as vigilant as you can watching for signs of alcohol/drug abuse, suicide talk, and even taking it out on the potential affair partner/spouse. Know too you really learn very fast what a true persons character is while going through divorce, and what is said now, does not always equal what is written later. Fake accusations of violence, hiding assets, outright lying to the court, etc, etc.
You are undertaking a great effort, and I admire you for doing so... Your friend will remember this till the day they die, and be always grateful for your help, no matter how seemingly small or insignificant. Best of luck.