Before You Ask for a Divorce
I know from personal experience how overwhelming emotions can get when your marriage feels like it's not working. Before you announce you've had it, try this.
Make a list of the things you would do after you divorced, other than flirt or find a new sex partner, and do them for three months. Go out for dinner with your friends. Take a trip without your spouse. Learn to dance. Lose weight. Join a gym. Get a new hairstyle. Take a bubble bath every evening. Stop running errands for your spouse. Change jobs. Take your kids out to dinner without their other parent. Shop for an apartment or a smaller house. Maybe even rent a place of your own.
That's it. Don't work on your marriage. Work on yourself. Take your post-marriage life for a test drive. Get your mind off what you would get away from and onto what you would move toward. Don't say you're leaving. Don't promise to stay. Take 90 days to get to know yourself and be yourself again.
While you are doing this, there is a good chance your husband or wife will begin to see you and your marriage very differently. And you might, too.