There is also a fundamental difference between the experience of feeling happy and viewing something from a positive perspective. Even someone with depression could choose a positive interpretation for an potentially saddening event, but that choice alone would be unlikely to result in the experience of happiness, precisely because depression impacts the very ability to experience happiness, it is something more fundamental. There is also the question of whether depression makes it difficult to pick positive interpretations for events, but that is orthogonal to the point here.
I know it may not mean much from a random internet stranger, but some of the things we talk about in my family, to avoid some of the potential mental issues, are: never get too tired, too hungry or too lonely. The list should probably include some other things like never get too sedentary, but we've tended to talk about exercise seperately. These I've found are necessary, though maybe not sufficient for good mental health.
Sadly, most of this advice is to avoid the deep spiral which can be incredibly hard to come back from. Mental health is hard, and taking care of yourself can be much harder than people make it to be. Please take care of yourself as best you can.