there is not a one size fits all answer for this stuff since we are all different. a constant self awareness of your mood, "vibe", emotions, thoughts, etc maybe. the way to maintain staying positive is to know and recognise when you're not and make adjustments.