I do understand how you're feeling. I was married previously for 20 years. I had 3 children in that marriage, achieved wonderful things professionally, and for some time my ex-husband and I were happy.
We should have gone our separate ways after about 10 years and the birth of our 2 daughters. But we didn't. We carried on for the sake of carrying on. We carried on knowing we weren't enjoying being with one another. We were not in love, and we did not even have love left. Our sex life was never good but it was 'ok'.
I felt unwanted, insignificant, alone, so alone and very unhappy. On the outside everything was great, what was there to be unhappy about, right? But I wasn't living. I was existing. And I don't mean I needed fireworks and violins. I just needed to feel connected and wanted.
8 years after my divorce, I met my DH. We got married last year. THIS is living and I have promised myself that should I ever find myself in a similar situation, I'll try and fix it but if not, I'll walk away.
OP, you get on shot at this life. Please don't think you have to keep living like this, it's actually better to be alone. The hard part is that once you know you're unhappy, you can't un'know it, and that means you either keep comprising and suffocating or go through the painful change needed to set you free.
And yes, a good shag with someone you feel wanted and loved by, attracted to, it's fucking amazing! (Excuse my language.)