As Veronica says, and I agree with, none of us feel awesome 24/7. By denying the feeling, worrying over feeling bad, and remaining in it, or fighting the feeling, we only prolong it. As I learned throughout my life, the best way to remove those moments is to let yourself feel it, acknowledge it, then allow it to drift on out, but don't dwell and focus on that or ever beat yourself up for it. I agree with RubyLooToo in that in those moments, focus on yourself (and the rest too). Not in a bad way, but a healthy way. Go for a walk, exercise, take a bath. Something that allows you to drift into that calm state. Attempting to change from sad to happy won't work, but going from sad into calm I've found much easier. Hope that helps.
If you have a local pet store and like animals? Go hang around the puppies and kitties for a bit. That'd really distract your thoughts and perk ya up too. I have a pack which helps keep me laughing when I get down. So it's less about controlling the moments, but feeling, embracing, then moving on and letting it pass. They'll come less as time goes on.