When you feel sad, go do something. Do something that usually makes you happy. Take your mind off of whatever is bothering you, not to completely distract you from pain, but to let you come back to it later with a different perspective. Go work out, hang out with friends, watch a movie, read, be productive… Movement is key. Don’t sit and wallow in your sorrow. You’re likely not going to come up with a solution to your problem if you only focus on the bad and feel sorry for yourself.
Smile. Laugh. Move. It’s hard to be sad and laugh at the same time. When your body feels good (like during/after a workout), it can trick your mind into feeling good. Get going and you will begin to feel better. And realize, all things pass with time. The sadness you’re currently feeling will eventually go away on its own, but it will go away even quicker if you help the process.