Just because something ended badly doesn't mean that there wasn't any good in the foreplay.
When I used to let myself think of the past, it used to make me sad because it was gone and ended badly. But now I can take everything I learned and grow from it. It's the greatest feeling ever. :)