All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Our advice to you is to speak with your husband and explain your need to stay with him in the same country and your inability to endure his absence for long periods of time. You should also remind him that Allah, The Exalted, has enjoined him to live with you in kindness and guard your chastity according to your need and his capacity, and that one of your due rights over him is that he should not be away from you for more than six months without an excuse, as we have previously underlined in Fataawa 84073, 82147, 85711, and 88642.
Regarding the impermissibility of severe wife-beating, please refer to Fatwa 102012.
If your husband does not listen to you, you should seek the mediation of some relatives or other righteous people whom he holds in high regard and would most likely accept their advice.
If he insists on staying abroad and leaving you in your country, our advice to you is to seek the help of Allah, be patient, and guard your chastity. It is impermissible for you to masturbate, but you can overcome your sexual desire by holding firmly to your relation with Allah, lowering your gaze from what is forbidden, distancing yourself from temptations, avoiding whatever may stimulate sexual desire, and striving to preoccupy your time with beneficial deeds, along with remembering Allah and supplicating Him as much as you can. Also, refer to Fatwa 87550.
We do not recommend asking for divorce as long as your husband provides for you and does not cause you physical harm, because it may not be the best solution for your problem and may not relieve you of your distress. Being patient with the father of your child who fulfills some of your rights over him may be better than divorce and staying without a husband.
Allah Knows best.