I don't know why you were downvoted, but I will say that for me caffeine has not directly impacted my depressive episodes. The closest is when it impacts my sleep. I've learned that poor sleep quality and insomnia are my first obvious signs of a depressive episode, but the causal direction is not always straightforward (depression -> insomnia, insomnia -> depression? Both have happened, they feed on each other). So keeping caffeine to the morning and early afternoon is sufficient in my case.
However, caffeine does heighten my anxiety (with or without the impact on sleep). Maybe I should quit caffeine, but I like my morning coffee ritual so have no plan to right now. Instead, I take periodic breaks from caffeine to make sure I'm not addicted again. If I can go a few days without caffeine and without getting a headache, then I'm good. If I can't, then I'm probably consuming too much and it will (or already has) exacerbate my anxiety.
However, caffeine does heighten my anxiety (with or without the impact on sleep). Maybe I should quit caffeine, but I like my morning coffee ritual so have no plan to right now. Instead, I take periodic breaks from caffeine to make sure I'm not addicted again. If I can go a few days without caffeine and without getting a headache, then I'm good. If I can't, then I'm probably consuming too much and it will (or already has) exacerbate my anxiety.