I was divorced from my first marriage after 7 yrs, with 2 small boys. After 3 yrs, met a wonderful woman with a 5 yr old daughter, and we got married later....it's been 29 yrs. Now.
That 5 yr old daughter of my wife's (my step-daughter) thinks more of me now that her real father. He was a real pain, while she was growing up. She is 36 yrs old now, married, and we have a 9 yr old grandson.
What you are going through come with the "territory"; ie, divorce with children!
There isn't much you can do, but just hang in there. Your ex-husband probably won't listen to anything you have to say. If he had, you might not be getting a divorce! He will probably do as he pleases, and his family, too.
One thing; don't "badmouth" your ex to your children. You don't have to explain "why" or whatever about what he does or thinks. The children will learn this for themselves. Later, they will make up their own minds about him.
Best of luck, and hang in there.