There is a branch of decision theory called Regret Theory which contains the concept of minimax regret. Using this concept, one analyzes the worst-case (i.e. max) regret and attempts to minimize it.

In order to minimize your regret, you need to visualize and imagine what your worst-case regrets might be.

In terms of marriage, the worst outcome might be divorce rape and having your children ripped from you and supporting your wife and children while they live in your old house with her new freeloading lover while you eat ramen every day.

However, assuming you can avoid that, there are still some outcomes that might be even worse.

Here are a couple of stories that might give you some idea. One is an example from /u/rollo-tomassi's excellent article Wives & Lovers about a man "Resentful about so many years of crappy sex":

My wife called me today and was all excited about some beachfront apartment she saw. She wants us to buy it for vacations and such.

Now here I am .. I just turned 50. My youngest is going to college this year and I guess I just realized that I'm no longer bound to her.

The last 20 years has been a long series of quickies and 3 minutes handjobs every 3-4 weeks. In between, I spent my prime sexual years mostly masturbating to get off. Now that I'm 50, my drive is still good, but it's not what it was.

I had tried everything I could think of over those 20 years to get things on track. I was exemplary with chores around the house, I was attentive to her emotional needs as far as I could anticipate them, and even if I do say so myself - I've kept myself in outstanding shape (although that was more for me).

On the other hand, I look back and I can hardly remember a time that she spontaneously gave me a neck rub, or cooked something just for me as opposed to all of us, and certainly not even attempting to do something special for me sexually (yeah, I have a minor kink or two).

But when she asked me to buy a beachfront place today - my immediate reaction was annoyance. I realized then that I feel resentful. I have decided to leave her. There is absolutely nothing she can do now to change anything because the past cannot be changed.

I have no questions. I just wanted to rant a bit. Thanks.

Another is from a /r/DeadBedrooms post titled "My youngest is going to college this year. Guess who's going to GTFO of the dead bedroom house for good" that sounds eerily similar:

20+ years of shitty infrequent sex. Constantly having to make an issue of it so I wound up feeling like a bad guy.

She's making travel plans for us this Summer. Like I'm going to spring for another fancy vacation in a fancy hotel where we have no sex. I hate the fact that she made me waste so many of my best sexual years with her bullshit. I don't care if she tries to start with pornstar sex now. I won't believe it to be anything other than some form of manipulation. I'm counting the days now.

Thing are looking up for these men - their youngest children are adults now and so they can finally leave their sexless marriage without destroying their lives. Still, they paid the heavy price of 20+ years of low-quality and infrequent sex.

These men might have been partially responsible in bringing these situations onto themselves. The fact that their wives planned on taking fancy vacations or buying beach front property when their sex lives were on the rocks indicates that they've been pandered too without having to give anything back. Beachfront-property man wrote this incredibly beta comment later in the thread:

I've done a great deal for her and always have. Even stupid stuff. The other day, my son ate the last of the tangerines. She started pouting in a playful way and asked if I would go to the store and get her some more. She asked nicely. I got in the car and got her some more. I do things like this all the time. I think I treat her well, respectfully, and lovingly - but I guarantee you she'd never run to the store to get me something just because I ask her for it.

However, even if you are the most alpha of alphas, your wife may one day decide that she doesn't sexually need you anymore now that she has kids, and all the dread game in the world will be for naught because she knows you love your kids and don't want to destroy their lives and risk having them end up with an abusive or otherwise undesirable step-father.

Now tell me, how do you go about minimizing that regret?