When you have a bad experience its easy to see only the negative side, however with time you often look back and see the benefits you gained.
It would be easy for me to look back on the last few years of my life (well the majority of my life to be honest) and think about all the bad things that have happened and focus only on the negative side. Why did this have to happen? Why me? What did I do to deserve this?
However, as horrible as things may be or seem at the time when they're happening, usually as time passes and with the help of hindsight we can look back and see the brighter side. The experience itself may still be a horrible thing, but look at the way it has changed your life for the better. Everything we experience during life moulds us into the person we are today.
I'm still annoyed at all the things I experienced during my marriage (mainly because I let myself get into that situation in the first place), but at the same time I am oddly grateful for the experience. It allowed me to grow and become a much stronger person. I will never let anyone treat me like that again. I know exactly what I want in a relationship and exactly what I don't want. I stand up for myself more, whereas before I was extremely submissive. I now express my opinion instead of keeping quiet. I have a voice.
I'm also grateful for the experience because without it (and more importantly without the end of it) I would not be where I am today. Life had much better plans for me. Now I'm in a wonderful relationship and it's everything that I could ever want because I grew into a much stronger and confident person, and I wont accept anything less.
We all have a choice to either let the bad things in life affect us negatively, or turn them into positives. It may take a long time to see the positive side, but eventually you'll get there. You don't have to be a prisoner of your past, instead when you're ready, you can turn it into an opportunity to grow.