You're just going through what everybody does. It's okay. If there's an affair of some kind involved you're not mentioning, you should because that changes things.
Ultimately, I've known people who've stayed in the situation you describe and people who've left and the only thing that has determined how happy they are in the end is how much they commit to their decision, believe in it and treat people as they would wish to be treated as it plays out. It is the ambivalence that will destroy you and the nagging unhappiness being focused on that makes you unhappy.
It sounds to me like something drastic needs to be addressed in yourself and your marriage to go on, think about what you would do if you were free. Think about what you would actually do if you were single and wh it appeals to you. Then ask yourself, honestly and truly, why you are not doing that now in your life. You may find you are focusing on your DH being the problem because that is the easiest thing to find fault with. But really, when we reach 40 and sense the last half of our life arriving, we freak the fuck out, rightly, and it's that which is driving you half-mad and needs facing. With men we snort and call it a 'mid-life crisis' But the truth is it's an existential nightmare for anyone, the sense of 'this is it' and 'i'm definitely going to die'. The things which make us feel alive become particularly tempting; travel, freedom, risk, falling in love. And everyone understandably has moments of aching doubt, regret and yearning because we only get one go round and once things are in place in some way; job, family, house, it can feel suddenly empty again.
"Perhaps when we find ourselves wanting everything it is because we are dangerously close to wanting nothing" Sylvia Plath