A man is a creature dictated by his emotions. The emotions often lead to other emotions, forming loops and sequences which lead to different things depending on the type of external stimuli received. The emotions experienced by the man often have an impact on the kind of stimuli he receives, though certain randomness persists. For example, a man that hates another can beat him up and experience regret later on, which in turn would lead to sadness. With this being the case, how does one live so that his emotions lead to more good emotions and actions?
There's two ways to go about the subject. First would be to learn absolute control over your feelings, forcing yourself not to act over what you feel like doing but rather what you know will make you feel good afterwards. The massive amount of self-control this requires should be apparent to just about anyone, but the reward of a primarily happy life could just be worth it. Of course, one could argue that the person would be constantly lying to himself and others by keeping on the illusion of him acting as wanted, when in reality he only seeks goodness, probably in form of personal satisfaction, to come out of all it. Another could respond by saying that once he'd get in the loop of happiness he wouldn't be lying to himself no more.
The second way would be to get yourself in the good mood and block all possible interference immeadiately afterwards. This way one could experience a forced loop where no outside interference was present to break the fragile structure built by the individual. The only problem would be the person's mind as the seclusion might cause emotions of loneliness or not feeling complete. This would require for him to head out to gain the good mood again, which he would then return to savor as long as it'd last. Would he, too, be lying to himself? Probably not, as he'd intend to be fully conscious of his procedure, for it'd be essential for it to work.
From this it can be concluded that when a person is feeling down, he should seek external stimuli to help break his emotional loop and set it on a new sequence which, in turn, could possibly lead to happiness. If it doesn't, he could just go find another way to shock himself out of the loop and see where that leads. If all still fails, which should be probabilistically impossible, at least the person gained a lot new experience. Nothing to lose here, really.