In a happiness and sadness story, the characters' dreams and expectations are important elements. If a character dreams of winning a competition but fails, that's sad. But if they keep trying and finally succeed, it's happy. Another element is the support or lack of it from others. A person who is sad might become happy with the support of friends. And the setting can also be an element. A gloomy place can enhance the feeling of sadness, while a beautiful place can add to the happiness.
A crucial element is the contrast between the two emotions. In a story, a character may be at the lowest point of sadness, like losing a loved one. But then something unexpected happens, such as finding a new purpose in life, which brings great happiness. The cause - and - effect relationship is also key. A bad decision can lead to sadness, while a positive change can result in happiness. And the internal struggle of the character is an element too. They might struggle between holding onto sadness or choosing to be happy.