"Where Qoheleth stands apart from the wisdom of Proverbs is that he assumes an intensely personal perspective. Proverbs is essentially collective in its ethic, being an anthology of sayings from many sources and taking as its yardstick social values: respect, honour, wealthy, posterity. It accords authority to society as a whole and to the tradition of wisdom sayings. Qoheleth does not. He observes on his own authority, and he is overwhelmed by the fact of his death, presumably his own most of all. Does he, then, have any practical advice to offer? despite the fact that he regards it as preferable not to have been born, he apparently does not advocate suicide, or even despair. He is more of a realist than a pessimist. seven times he makes a specific recommendation to be happy, enjoy life, eat and drink, have a cheerful heart. But he does not suggest that this can be done by abandoning oneself to the life of dissipation. Joy is to be found in eating and drinking, to be sure, but as regular human activities not in the sense of revelry. He enjoins pleasure in work also. The proper response to life, according to life, according to Qoheleth, is to accept it, and while one has the opportunity, make the most of it."
I don't agree with everything above, and I would suggest that Qoheth's theology plays a part in his perspective. I might slightly rephrase the point that Qoheleth is more a theological realist than a secular pessimist.