I would say that Darwin's theory of natural selection suggests an optimistic view of the world. I understand the pessimistic viewpoint. The mechanism by which natural selection works is based on the concept of "survival of the fittest." An animal that is less fit, because of a lacking adaptation, will die. That's sad. But that only looks at the death half of survival of the fittest. The optimistic side is that "life will find a way." You can thank Malcolm from "Jurassic Park" for the great one liner. Adaptations will lead to naturally selected survival. That's not sad.
Darwin's theory says that populations of animals are always changing. They are adapting, not by conscious choice, but by random genetic variation. Darwin didn't know about genetics at the time, but he did note that species had specific adaptations to best suit their niche. His theory proposed that given enough time, a species might adapt and change so much, that it doesn't resemble the original any more.
What's optimistic is that natural selection works to have the fittest organisms occupying any particular ecosystem. If that ecosystem changes, natural selection says that life will find a way to adapt and begin thriving again. It's a very hopeful attitude. Especially today as biologists worry about climate change and species like the polar bear. It is possible that the species goes extinct. But Darwin's theory suggests that the species will eventually adapt in some way, which is an optimistic outlook.