Indeed those two sides are separate ends of the same one coin. one cannot exist without the other. It's important to value happiness when it comes, we can't even value it without experiencing sadness in the first place.
So they are both necessary in the journey of life. But is important tend towards happiness no matter how the situation may look like as dwelling in sadness can lead one to depression.