This a case of times have changed and scriptures haven't. Let's consider first that the wife was considered much like the husbands property. Women had few if any rights and could not own real estate. If a father without a son or sons died, his daughter or daughters had to marry someone from her/their fathers tribe so their fathers inheritance would stay within his tribe.
Husband were also permited to multiple wives
and concubines. Women did not have the right to divorce their husbands. That's why the Biblical divorce laws were directed at husbands in every case I can recall. If she was not guilty of adultery and it was not the reason for divorce and she remarried. The sin of adultery fell upon the
husband as well her second husband. Enough of those legalistic technicalities because Jesus said in
Matthew 5:28 But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart. NIV. I think that most hetrosexual men fall into that category.
Now about the custody enigma; If your locality has a 1 party/ no fault divorce law and you contest the divorce. Your husbands lawer can declare you to be a hostile influence. Which would hinder your ability to even see your child or children. Our post modern society laws are not based on Biblical standards but the mumbo jumbo lawyers go to school for years to learn how to twist and turn.
I seriously doubt if the Lord will hold it against you, if you make the decision that allows you see or keep your kids. In my opinion the entire mess will be upon his (your husbands) head not yours. In most case I've heard of, Courts prefer maternal or joint/shared custody over and unmarried father. I've been through it. So I'm not just an inexperienced talking head. May the Lord be your counselor and the Holy Spirit be your helper. In Jesus name.