Make a list of good deeds you can do and force yourself to do them when you feel sad. This may be very difficult. But realize that exactly because it is difficult, it is more meritorious to do "good."

Thinking, "How good it is that I can do good even when I feel bad," will help you feel better. Especially, devote time to doing acts of kindness for those who could use your assistance. The more you think about others, the less time you will have for self-pity.