Does pessimism cause depression or does depression cause pessimism?

Depends. Which came first, the chicken or the egg? Depression is a profound, even physical reaction to loneliness, loss, or hopelessness that blocks motivation to seek fulfillment or even survival. Pessimism is a thought process, an intellectual choice of how to look at the world and predict our fate. You can have one without the other. Mood and thought can affect each other but are not the same thing.