Hello rip: Welcome to PsychCentral. I don't have any ideas on what to do to cause your wife to find you attractive. From my perspective this situation may well simply be what it is & it's a matter of figuring out what to do about it. I would think the appropriate way to proceed would be for you & your wife to engage the services of a marriage & family counselor with whom the two of you can decide on how to proceed from here. (Do be sure to read the 4th article below with regard to this though.) I understand your desire to keep your marriage together for the sake of the kids. But, from what you wrote, it sounds like your wife may not be willing to go along for much longer. And if divorce is in the cards better to do it amicably, & in a well planned out manner, than to have it all blow up in everyone's faces.
Here are links to a bunch articles, from PsychCentral's archives, on the subject of facing the possibility of divorce:
https://psychcentral.com/blog/burned...dium=popular17
https://psychcentral.com/blog/should...dium=popular17
https://psychcentral.com/lib/7-reaso...ge-counseling/
https://psychcentral.com/lib/when-on...-other-doesnt/
https://psychcentral.com/blog/4-warn...edict-divorce/
https://psychcentral.com/blog/loneli...thin-marriage/
https://psychcentral.com/blog/shocke...sts_position=2
https://blogs.psychcentral.com/paren...bled-marriage/
And then here are links to some articles on the subject of children & divorce:
https://psychcentral.com/lib/kids-an...-tough-issues/
https://psychcentral.com/lib/reduce-...divorce/?all=1
https://psychcentral.com/lib/book-re...-your-divorce/
https://psychcentral.com/lib/putting...rough-divorce/
https://blogs.psychcentral.com/heali...omment-page-1/
https://blogs.psychcentral.com/famil...after-divorce/
Hopefully within all of this, there will be some information you can use hopefully to save your marriage, but if that's not possible, at least to make the split as amicable as possible. I wish you & your family the best.