All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If this man is as you described in the question in treating his wife, then he is abusing her while he is ordered to have good marital relations with her; as Allaah says (what means): {And live with them in kindness. For if you dislike them - perhaps you dislike a thing and Allaah makes therein much good.} [Quran 4:19]
Also, the Prophet advised men to be kind to women as he said, "Treat women kindly."
So it is evil from this man to beat his wife, abuse her, threaten her with divorce; this is a kind of cunning and is of bad manners. If he does not keep his wife in kindness, he should divorce her in good terms.
Hence, his wife has the right to ask to be separated from him, even with khul’. However, she should first try to rectify him, reconcile with him, supplicate for him, as well as admonish him in a gentle manner and seek the help of righteous and pious people to admonish him and try to reconcile between her and him. If this is not achieved, then she may separate from him and ask him for a divorce or khul’. For more benefit, please refer to fataawa 131953 and 89039.
As regards the children, then Allaah will protect them, and He will enrich her from His Bounty and Favor and might give her a husband who is better than him. Allaah says (what means): {But if they separate [by divorce], Allaah will enrich each [of them] from His abundance. And ever is Allaah Encompassing and Wise.} [Quran 4:130]
As regards the custody of these children, then it is the wife who has the right to their custody and not her husband. If she remarries, however, then the custody is transferred to another female relative who is worthy of fostering them. Please, refer to fatwa 84618.
In any case, their mother should endeavor to nurture them and give them good guidance and supplicate for them to be raised in a righteous manner.
Allaah knows best.