Training Models to Generate, Recognize, and Reframe Unhelpful Thoughts