Figure Analysis
Technically, the "wise man" isn't a character. But Ecclesiastes talks about the behavior of the wise man—as opposed to the behavior of the fool—a great deal, so it'll be useful for us to try to see, exactly, what sort of person the wise man really is. The difference between the wise man and the fool is a little like the difference between the two characters in this comic strip called "Goofus and Gallant" that used to run in Highlights magazine.
The comic strip would always show a picture of Gallant—a good, noble-hearted young man—holding a door open for an old lady or something. And then the next panel would show Goofus—a depraved sociopath—doing the exact opposite: slamming the door in the old lady's face and then punting her cat down a flight of stairs. Yeah—it was dark stuff.
But back to the wise man: the wise man knows when to be quiet. The fool does not. The wise man sees that God is above everything, and totally incomprehensible. So he fulfills all of his vows and doesn't chatter on aimlessly at God. He also realizes that more wisdom is to be gained in "the house of mourning" than in "the house of mirth"—by facing up to the sadness and suffering of the world, and seeing it exactly how it is. He is able to become content and—basically—happy. It's a kind of paradox: "Sorrow is better than laughter, for by sadness of countenance the heart is made glad" (NRSV 7:2-3).
As Professors Bloom and Frye both put it: by accepting the emptiness of everything, the wise man is able to live a fuller life. Ecclesiastes himself says: "wisdom giveth life to them that have it" (KJV 7:11-12).