Not all heartache is bad, with hindsight.