When Elijah thought he was alone in his battle against Jezebel, he indulged in self-pity which led to depression. Self-pity is dealing with life's problems from a self centered point of view. God reminded him that there were 7,000 men in Israel who had never bowed to Baal. God also urged Elijah to get into action to counteract his depression. And, Elijah did, with God's help.
Depression is caused by one's attitude toward circumstances of life.
Moses became depressed as he led the Israelites in the wilderness. Moses lost hope. He'd rather die than have to put forth any more effort. He wanted to escape from his circumstance. The fourth cause of depression can be the effects of medication.