If for everything that makes us happy there is an opposite version which makes us unhappy, then the reverse should be true as well. The following is not any kind of attempt to be scientific, but simply some casual observations on what happiness and sadness might actually be.
First off, let me posit that when you think of unhappy things, you feel unhappy, and when you think of happy things, you feel happy. In addition to this, let me say that sometimes we seem in control of our thoughts, and other times we don't. Sometimes it is not even obvious to us that we are thinking about something, and this manifests itself in a physical reaction we don't have a direct and convincing way of explaining. Either a feeling of peace and relaxation, or a feeling of tremendous stress.
Often enough, life just happens to us, and it either presents us with pleasant things to think about, like a new and interesting person we've just met, or unpleasant things to think about, like a sharp pain suddenly appearing. So I have often thought that happiness is not really something we control, but something that happens to us. For all our efforts to put ourselves in positions where we will be the most comfortable and have the most opportunities to succeed, our happiest moments are really those which occurred unexpected, without us having to do anything. Our saddest moments just the opposite, when we have spent a great deal of time on something and still have problems. In other words, there's is an inescapable element of luck to our happiness, and yet I come to think again that this is not the only factor at play.
As human beings our minds can only hold so many ideas in working memory at once. In order that we don't lose forever thoughts which fall out of working memory, we have various other kinds of memory to bring ideas back into working memory as needed, according to particular triggers. In this way our thinking becomes habitual, because there are certain thoughts which will tend to recur each day, in order that we can achieve longer-term goals. At first they may be for unresolved problems we have some slow-burning agency in, but later, for chronic problems, they can be useless thoughts of self-pity or anger over problems we no longer have any reason to believe we have agency in, or even with problems that have been resolved but which went on for a long time before they could be resolved. In other words, once thinking about something has become habitual, thoughts about it can linger long after there is nothing more to do about that something. It does not just have to be for something bad, of course. We may entertain a nostalgia for some glorious moment in our lives in which we feel we had acted very finely.
I believe that these habitual thoughts turn into latent thoughts. That each time you think of something useless and painful, you are not just hurting yourself now but also in the future, because somewhere in your mind those neurons that create those thoughts have gotten sturdier, and will fire more easily the more often you think with them. Simultaneously, although you may feel overall poorly, thinking of things which are life-affirming is an investment in your future happiness, predisposing you to feel more relaxed later. When we think of something habitually, when we think of something several times a day, even when we are not particularly thinking of it, we have a vague awareness of the overall character of our usual thoughts, and it affects our mood. It makes us anticipate more thoughts of that nature, and makes us feel the way those thoughts normally make us feel. Then, at the slightest reminder, the slightest resemblance in something to what has been on our mind so many times before, we are driven into repeating the habit and further cementing our minds into this state. If it is negative and you have no agency over what's bothering you, it must be overcome by conscious effort to think of other things. If it is positive, so much the better for a happier, more optimistic life.