It's normal to feel that way - as if you wasted a good chunk of your life and the whole thing was pointless and that you 'should have known better'.
I believe that people are brought into our lives when we need them, and they help us grow (whether negatively or positively) until we reach a point of conscious choice: have they grown with me and will they continue to grow with me?
When I married my ex-husband, I was a very sheltered and scared person who knew NOTHING about being an adult in real life. All I wanted was an older man to take care of me and I'd give him whatever he wanted - including children.
What ended up happening: he was a grown child who could hardly hang onto a job and believed sex was nothing more than a genital sneeze (on top of having mother-son incest fantasies). He was passive-aggressive, emotionally abusive, and blamed everyone for his lot in life. I was the breadwinner, I was the one who worked my ass off to pay the bills and keep the wolves at bay and talked to everyone in authority, I was the responsible one the whole time.
The marriage proved to me that I wasn't scared of adulthood and everything it entailed. I was scared of being alone. This was a powerful revelation to me. And after the trauma of wanting to jump off a bridge wore off, I was angry that my loyalty and commitment to a man who did nothing for me made me want to take my own life to stop the pain of being married to him.
I was finally able to get past the two horrors that had kept me compliant - 'How would this affect him?' and 'How would he take this?' - and I told him it was over.
My marriage had been dying a long time, and it felt more like relief when I finally cut its 'life support' by telling him the marriage was done. I still mourned. I mourned the loss of my writing partner more than the loss of my husband. I mourned the lost years, which I later accepted as years I spent growing up and becoming my Own Woman - a far greater gift he could have given me than anything else in our marriage.
At best, I would say that we were great friends but lousy spouses. At worst, I would say that we married each other for the wrong reasons, and it was delusion to believe otherwise for the nine actual years of marriage.
Everyone's experiences and mileage are different, but do know that all the emotions are normal. *hugs*