There's no research that shows a direct link between caffeine and depression. However, caffeine and depression may be linked indirectly for people who are more sensitive to the effects of caffeine a mild stimulant than are others.
Caffeine can make it more difficult to fall asleep and stay asleep. A lack of sleep can worsen depression. If you have trouble sleeping, don't drink caffeinated beverages late in the day. Some people need to limit caffeine consumption to the morning, or quit drinking caffeinated beverages altogether to avoid sleep problems.
Stopping abruptly can worsen depression if you regularly consume caffeine. Quitting caffeine can also cause other signs and symptoms such as headaches, fatigue and irritability.
If you have depression, you may consider limiting or avoiding caffeine to see if it helps improve your mood. To lessen these withdrawal effects, gradually reduce the amount of caffeine you consume.