Warning: excessive wordiness follows. Read Lance Roberts' answer for a clear, concise and convincing argument. This is only a prolix meditation on what he said.
Introduction
Ecclesiastes harps on an aspect of life which should be obvious—but we tend to ignore it: how insubstantial and difficult life is under the sun. When the unregenerate ignore it, they become inured to their need for Christ; and when the regenerate ignore it, they loose much appreciation for Christ. Further, they loose touch with people who can sniff fakeness at fifty feet away, and so they are ineffective at ministering to the downcast. Whoever ignores it becomes frivolously and unrealistically lighthearted. Welcome to bubbleheaddom! But Ecclesiastes is honest.
Sample Exposition
Let me work through several verses to demonstrate what I mean.
3What does a man gain by all his toil under the sun?
It is a chronic delusion of man that lots of striving will leave him somewhere better off—and as far as under-the-sun vapor is concerned, it sometimes does. But vapor is only vapor; any truly wise man will tell you that as we enter the world—naked—so we will leave it. Wisdom takes striving as vapor; not as something meaningless, but certainly as something to be rested from. Don't store up treasures. Nothing inverse about that wisdom!
4A generation comes and a generation goes, but the earth remains forever.
I almost feel myself a fool to even comment on such profound wisdom. Profound wisdom is such that, if repeated wrongly or by a fool, it is purely trite.
It's easy to feel as if you have something new—something unknown to other men or to previous generations. It's easy to feel that way when you fall in love. Sorry; you aren't the first person to fall in love. You've not even the ten-thousandth person to fall in love. And you are probably not among the ten-thousand most passionate lovers in history. (Just try writing something like this. I for one barely even understand it; the poetry far outstrips me, and I am a poet.)
You might have been the valedictorian at your college, while getting two majors in unrelated fields, taking a foreign language for the enjoyment of it, running campus clubs, playing sports and cultivating meaningful friendships. You aren't exceptional. It's been done before; often. And it will be done again. (See verses 9 and 10.)
Your life might be extremely hard. You might experience pain and horror far beyond what your neighbors experience. Even if you become famous in our generation for your misery, it is nothing beyond the lot of men. People have been raped and maimed and cheated and oppressed and hated and maligned and manipulated and have lost everything before. Genocide is not new. Abuse is not new. And none of it shows signs of abating.
Hmm. Not much there which is only true in some sort of negative or inverse way. In fact, if you have some wisdom you may be saying, "Wow, that is really obvious." Yes; what makes it so profoundly wise is the fact that humans seem so incapable of coping with the realization that all the stock ways we like to define ourselves do not make us special, and with the realization that we are not on the verge of ridding ourselves of misery. It's just the next iteration of humanity.
Verses 5 through 7 run in much the same vein, but with emphasis on the physical creation. They are plain and undeniable—and yet with a deeper meaning; thus the Teacher concludes from them:
8aAll things are full of weariness; a man cannot utter it...
I'm a software engineer. Software is the epitome of vapor. What intense skill must be exerted, to accomplish such astonishing tasks—until our newest competitor makes us obsolete, or the whole codebase is entirely rewritten.
On a more personal level, I am kind of demented about making my code beautiful. So far in my experience, that kind of dementia is a rare disease. I've worked with a lot of legacy code, and with a lot of people who might have benefitted from reading this book. I cringe every time I extract a pretty little class, test-driven and refactored, from a big ball of mud—I shudder to imagine the fate of my little works of art.
Okay. Sorry for geeking out there for a bit; it might seem like a diversion, particularly because there are people on this site who did not come here from StackOverflow. Here's what I'm trying to say: This is personal to me. I get it. Life is full of weariness. I'm spending my life1 writing code that's only going to be messed up and then eventually thrown away. The net result of all my code in the span of human history: negligible.
Let me hate on the cat who wrote the question for a minute. I suspect that when he held to his former position about Ecclesiastes, he was buying into the "Christians are supposed to be happy all the time" lie. There is a superficial idea among Christians that if we ever reach a point (like Job did!) where we just can't explain away the problems then we have reached a theological failure.
This is not the only part of the Bible that deals with problem. Try reading the Psalms, Jeremiah or Lamentations. How can some of the apparently extremely pessimistic statements be taken?—as real talk, homey. The Bible is real talk.
And my writing tone—now—is not one that offers you a neat little bow to tie all your little problems up with. —Propaganda
Do not confuse God's goodness with your ability to explain it. My frustration at work isn't just me and can't just be fixed by working with programmers who love clean code. It is a pandemic problem—
8b...the eye is not satisfied with seeing, nor the ear filled with hearing.
My problem is simply that temporal things do not satisfy. I cannot be made happy by any organ of my body, for it is only vapor that passes in and out of my organs. Organs only want more until they wear out.
Now this is certainly not at all in tension with the other teachings of the Bible. All the passion of the righteous man is directed toward one thing:
One thing have I asked of Yahweh, that will I seek after: that I may dwell in the house of Yahweh all the days of my life, to gaze upon the beauty of Yahweh and to inquire in his temple. (Psalm 27:4)
He uses the terminology of "gaze," but he is certainly not speaking of something his earthly eyes can behold and be satisfied by (the beauty of Yahweh is only partly visible by the eye even to Moses on the side of the mountain). When this singlehearted purpose is strayed from, only dry cisterns can be found.
Conclusion
This line of reasoning can be extended to the rest of the book. When I used to think of Ecclesiastes as a book of negative wisdom, I was thinking rightly in that I recognized that the vapor ought to drive us to the Rock. However, to think that Ecclesiastes is the ranting of a man driven mad by his sin misses the candidness of the book, and decreases its potency. Not: if you don't cling to the Rock, you will go mad and see all as vapor; but rather: all under the sun is vapor—flee to the Rock.
1I'm about to start a new job at an Agile company, and hopefully there will be lots of demented people there. However, I suspect that even if I enjoy my job more it will still feel like vapor many days.