I assume you’ve already expressed your needs to your wife and tried everything possible to compromise and resolve your marital issues, up to and including marital counseling. There’s more going on to cause this unhappiness than just lack of sex. And when there are children involved it’s best to consider what the best stable home will be for them, whether that means staying married or getting divorced. You never said that you still love your wife or that you feel she still loves you. I hope you’re clear on where both of you stand in this regard.
If divorce is the only option you will need to consult a family lawyer, one who handles divorces. Find out what your rights are based on where you live and how best to make sure your family is taken care of. Most likely a judge will side with your wife and the best interests of the children. There are mediators who can help you sort things out.
It doesn’t sound good, and one could view this as abandonment of your family. You hardly are at home as it is and now you want out. I realize that isn’t who you are, and if you approach this as trying to still provide for your family, hopefully the outcome will be some leniency for you in whatever settlement you agree on.
Good luck. I wish you well.