Some of the hardest times in my life really have been the happiest. I’ve attributed this to my personal efforts at the time (and the help of the atonement, which can strengthen us.) My thought process has been that “If I’m trying harder to be happy, I’m doing more productive things that lead to greater happiness, and I’m not letting my happiness be dependent on the more external circumstance of life.”