If you've been sad, and spending time in that feeling, you’ve forgotten where you are. Don't get me wrong, there's nothing wrong with being sad, depending on how long you spend in that emotion.
Being sad for an extended period of time is like digging a hole where you just keep digging and going deeper into a tunnel. In time, you’re lost in the darkness and have forgotten where you are.
When this happens to me, I force myself to zoom out a bit. I take a look at my life from an alien's point of view. I remember that I am alive, that I am healthy, that I have friends and family (please don't mistake this for meaning every relationship is perfect), that I have a computer or phone on which to connect with others, I can read and learn, etc. It's the equivalent of digging a hole really deep and forgetting that I am really on a beach in Hawaii.
This is what life is like sometimes. We get wrapped up in what we're doing, or in a moment. Zoom out now and recognize all the things that are present to celebrate.