Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Islam insists that marital life should remain strong and united. That's why there is a severe threat for a woman who asks for a divorce without a sound religious reason.
The prophet (Sallalahu Alaihi Wa Sallam) said:" Any woman who asks her husband to divorce her without any harm,
Divorce is the last cure in Islam. It should take place only if the continuation of marital life on suitable terms is no longer possible.
Therefore, it would be more appropriate for your friend to try to reconcile with her husband and she has to advise him in good manner with soft words, choosing the appropriate time when he is relaxed and can concentrate. She has to remind him about Allah, and the rights of his children on him, regarding their education and care, and providing for them with Halal money. She has to supplicate to Allah as much as possible to guide him, (may Allah bring him back to righteousness.)
However, if he still persists in wrong doing, and she definitely thinks that if she stays with him she and her children will be more harmed than benefited in their marital life, then she can ask him to divorce her, and there is no harm on her and she is not affected by the threat stated in the Hadith mentioned above, because she asks for a divorce because she is harmed.
If he divorces her, then this is what is required, if not she can take her case to a Muslim judge, if any, or to the Muslims in the country where she lives to study her case and decide what is best.
Allah knows best.