I know this thread is old, but for anyone else going through something similar.
Don't immediately divorce her.
That's where the similarities between my advice and others' ends.
Get your shit together. Start working out. Eat better. Go out with some friends from work and don't tell your wife when you'll be home. Hit on some girls. Get your mojo back.
Your wife will probably nag. Who cares?
After doing this for a while, come home late one night and make a hard pass at your wife. Not flowers, dinner and a movie and some handholding. I mean pin her up against the wall and take her like you probably did when you first got together.
(nothing non-consensual, cause I know you losers will pipe up here)
Then see how things go.
If things get better, great. You've learned to stop being a nice guy and to get what you want. Your wife will appreciate this.
If she doesn't, get a lawyer, set your finances straight, and divorce her.