If you're enjoying life, with a happy and supportive family, cheerful and dependable friends, with good health, good income and a luxurious lifestyle, you would find the Buddha a pessimist.
Why? The Buddha says in SN 56.11:
“Now this, bhikkhus, is the noble truth of the origin of suffering: it is this craving which leads to renewed existence, accompanied by delight and lust, seeking delight here and there; that is, craving for sensual pleasures, craving for existence, craving for extermination.
So, you who are enjoying life, would experience aversion at the Buddha's words that apparently want to take this joy of life away from you.
So, it is not the Buddha who is the pessimist. Rather, YOU are the pessimist, or rather when you read the Buddha's words, the pessimistic emotion appears in your mind. It's your aversion to the Buddha's words.
On the other hand, if you have bad family relations, no friends, chronic pain and suffering from poor health, no money etc. then the Buddha would appear to be an optimist to you.
Why? It's because you are experiencing aversion from the painful situation in your life. So, the Buddha's words below from SN 56.11 would provide solace and comfort to you, that there is a way out of experiencing (mental) suffering. So, you get relief from your aversion. And that's optimism. YOUR optimism.
“Now this, bhikkhus, is the noble truth of the cessation of suffering: it is the remainderless fading away and cessation of that same craving, the giving up and relinquishing of it, freedom from it, nonreliance on it.
“Now this, bhikkhus, is the noble truth of the way leading to the cessation of suffering: it is this Noble Eightfold Path; that is, right view, right intention, right speech, right action, right livelihood, right effort, right mindfulness, right concentration.
When you look at the Buddha's words, whether you feel that he is an optimist or a pessimist, is actually a reflection of your own state of mind.
Coming back to the first case, where you're enjoying life, with a happy and supportive family, cheerful and dependable friends, with good health, good income and a luxurious lifestyle.
How can we change your mind so that you think that the Buddha is an optimist?
Read the following from AN 5.43:
For one desiring long life, beauty, fame,
acclaim, heaven, high families,
and lofty delights
following in succession,
the wise praise heedfulness
in doing deeds of merit.
Being heedful, the wise person
secures both kinds of good:
the good in this life,
and the good of the future life.
By attaining the good, the steadfast one
is called one of wisdom.
Voilà! Now the Buddha is an optimist to you.
Also read this answer for the question "Can a Buddhist own and run a billion dollar business?"
The Buddha was a realist who preached about reality as it is. Optimising is a mindset where one thinks that conditions are better than what they actually are. Pessimism is the opposite, where one thinks things are worse off than what they actually are. Realism is the middle ground where one accepts things for what they actually are, without undue focus on only the negative or positive aspects of reality. The Buddha Dhamma teachers to reality as it is a teachers a path to see reality as it is.
For those who delight in sensuality & attachment, the Buddha was a pessimist.
For those urgently searching for inner peace & happiness that is independent from worldly reliance and conditions, the Buddha was the supreme optimist because Nibbāna in the here & now is the highest happiness and the highest state a human can reach in terms of mental development.
That the Buddha revealed there is actually a complete end of suffering that can be found in this life is actually something supremely optimistic.
Well kind of.
There are other teachers and religions that think something like "it always works out in the end, nothing can go wrong, it's always a happy story, happy ending".
Whereas one of the Noble truths is that "there is pain" or dukkha or acknowledging that pain or suffering really does exist rather than a denial that suffering exists like many other dhammas.
But the true purpose of the teaching is for the cessation of suffering, reaching the highest bliss, extinguishment of mental fermentations.
In my opinion The Buddha Gautama was more of an optimist who acknowledged the reality of suffering existing rather than a delusional denial.
When encountering lay people he often encouraged them to fulfill worldly desires in ways that generates merit and when discussing things with monks interested in achieving arahantship here and now he discussed more direct methods.
When debating against a sensual hedonist he thought The Buddha was a life-destroyer:
“Even if I was to see Master Gotama face to face, Mister Bhāradvāja, I would say to his face: ‘The ascetic Gotama is a life-destroyer.’ Why is that? Because that’s what it implies in a discourse of ours.”
“In the same way, sensual pleasures of the past, future, and present are painful to touch, fiercely burning and scorching. These sentient beings who are not free from sensual pleasures—being consumed by craving for sensual pleasures, burning with passion for sensual pleasures—have impaired sense faculties. So even though sensual pleasures are actually painful to touch, they have a distorted perception that they are pleasant." (MN 75)
When debating against an ascetic who practiced painful austerities the ascetic thought more the opposite that The Buddha was more of an optimist:
‘Reverend Gotama, pleasure is not gained through pleasure; pleasure is gained through pain. For if pleasure were to be gained through pleasure, King Seniya Bimbisāra of Māgadha would gain pleasure, since he lives in greater pleasure than Venerable Gotama.’
‘Clearly the venerables have spoken rashly, without reflection. Rather, I’m the one who should be asked about who lives in greater pleasure, King Bimbisāra or Venerable Gotama?’
‘Clearly we spoke rashly and without reflection. But forget about that. Now we ask Venerable Gotama: “Who lives in greater pleasure, King Bimbisāra or Venerable Gotama?”'
‘Well then, reverends, I’ll ask you about this in return, and you can answer as you like. What do you think, reverends? Is King Bimbisāra capable of experiencing perfect happiness for seven days and nights without moving his body or speaking?’
‘No he is not, reverend.’
‘What do you think, reverends? Is King Bimbisāra capable of experiencing perfect happiness for six days … five days … four days … three days … two days … one day?’
‘No he is not, reverend.’
‘But I am capable of experiencing perfect happiness for one day and night without moving my body or speaking. I am capable of experiencing perfect happiness for two days … three days … four days … five days … six days … seven days. What do you think, reverends? This being so, who lives in greater pleasure, King Bimbisāra or I?’
‘This being so, Venerable Gotama lives in greater pleasure than King Bimbisāra.’” (MN 14)
According to The Buddha both sensual pleasure and painful austerities cause painful feelings.
The reason for avoiding sensual pleasures is to prevent the individual from experiencing painful feelings.
Because of impaired senses the majority cannot easily see the harm in sensual pleasures like how they can easily see the harm in inflicting physical pain.
But based on the suttas painful austerities are far more harmful in MN 71 The Buddha claims that almost no naked ascetic in the past 91 eons ever went to heaven after death whereas many seemingly normal lay people go to heavenly worlds after death. Also in AN 10.211 sensual pleasure is not listed as a something that ensures that someone goes to hell so it's probably more a rule for monks or those interested in achieving arahantship here and now.
If someone has a career or practice that yields painful feelings it's probably similar to a painful austerity.
The sammasambuddha Gautama preached for the welfare and actual supreme happiness of beings.
I say, that pessimism is the hinderance reffered to as doubt by others. But don't take my word for it, don't believe anything anyone tells you unless in makes sense to your own faculties and powers of discernment. Doubt, and question everything! Buddha said "question Everything, no matter who said it. Even is I have said it." This is someone who want you to find out the truth. Any teacher putting themselves beyond questioning should not be followed as a teacher. They want to conform you to their attachment to their egoic condition!
I say question everything especially if I Say It! Lol Find out! Only the question about Buddha is not the right type of question and any answer is likely to be within the parameters of nonsense. Buddha is not the name of someone, it is a quality of enlightenment... But I do question how some monks and organization have and instill such suffering that everything will lead to suffering unless you exhaust existing. I wonder if this opinion, and the detachment is a cause of suffering and conflict in the world. And if it is, so what? It is just so, and it is ok. Also perfect reality as it is. Theororetically...
No such thing is found in the Tathagata, he was a realist if anything in as far as he explained phenomena as phenomena and the escapes as escapes.
Most people's worldview does not take into account the escape nor do they stop speculating about phenomena.
To some of these people only the immediately visible overlap between the Dhamma and 'existential depression' is discernable and is grasped with wrong view as being evidence of equality between the two. Hence the misunderstanding and misrepresentation.
A pessimist is closer to the truth than one with a rosetinted perspective but the pessimist is unable to put his observation into proper context so he becomes despaired and unmotivated whereas the Buddha attains the highest happiness and is comfortable without a ground for sorrow and his students are dilligent, balanced and highly motivated.