No relationship is ever a waste of time. If it didn't bring you what you want, it taught you what you don't want.
"It's not what I have been through in my life that defines who I am, it's how I got through it that has made me the Person I am Today" - i'm with you.
The mistakes you made within the relationship that cost you everything. There's always a learning experience to be had.