If you are talking about occasional emotional issues, then many of the above suggestions are excellent. However, if you are habitually sad or angry, then it's important to consider that you may be addicted to the emotion.
That's right. Emotional states can be just as addictive as substances like alcohol or tobacco. Just as a junkie will find some way or another to satisfy their craving for alcohol, tobacco, drugs, chocolate, whatever, an emotional addict will always find a way to put themselves in a situation where they are sad or angry. It's a subconscious plan to reproduce a specific chemical state in the brain.
Recognizing that you are addicted to depression or anger is the first step in curing the addiction.