I got both positives and negatives out of all of my relationships. I drove myself crazy at first about all the time, energy, emotion, etc. that was wasted in those years, but eventually I moved on from that. One in particular is the most poignant for me. I loved him completely, and opened myself up completely (which is something I have only done with maybe 2 or 3 other close friends in my life). Despite all the bullshit and pain that happened later on in the relationship, I experienced real love and acceptance (or thought I had on the latter - hard to tell now, but perception is key in looking back). For a while I was happy, blissfully so at times, and I was perfectly content with a major aspect of my life. No need to move forward, to change things, to work for better. It helped me learn and accept a lot of things about myself and life as a result.
Not everyone experiences this. Not everyone falls in love and has an equal relationship with someone. There is usually the questioning, and wondering where things will go in the end, how does he feel, etc.
That is what you should take away from it, how it changed you for the better, and the great parts of it that you got to experience. It's impossible to always focus on that. For me I was so destroyed by a lot of fucked up shit he pulled in the end of it, that it took a while before I got the clarity that the bad was worth it to have experienced the good parts. I have a child with that guy, so unfortunately he still finds ways to hurt me somehow - but I still feel it was worth it for the good experiences (not to mention my child, whom I love).