After much experience of life and deliberation on that vast amount of wisdom gained, this person came to a personal realization that life, in and of itself, has no real meaning. This is not a defeatist attitude but one based on quiet, reflective realism. This individual is not lamenting that fact, but is simply stating it out loud.
The greatest question of all, "Is there, or is there not, a G-d?" is noticeably missing from all the equations posed by the writer. Why? Because he/she understood that this is one question that has no finite answer and therefore, one not befitting the main thesis of the present dissertation.
Like any great thinker, this person does not intend to or try and prove or disprove G-d, but simply assumes G-d. In reality that is about all that any person is truly capable of on this present level of enlightenment. However, it begs the question of faith. Is the assumption of G-d the same as faith in G-d? I believe the writer answers that inquiry with a resounding NO! Faith, by its own agenda, does require (even demands) some form of proof, albiet, ever so slim; whereas assumption requires only an observable and rational acceptance of life as life and for life's sake in all its myriad manifestations.
The author's final summation is one that any reasonable person must come to by assumption after living and contemplating in true honesty their own life: "The sum of the matter, when all has been considered: Be in awe of G-d and keep Its commandments, for this is a person's whole duty."
For the writer of Ecclesiastes those commandments happen to be the Torah of Moses, given by that assumed G-d on Mount Sinai. However, regardless of one's particular bent the same truth would apply: After all is said and done one must be true to their assumed idea of G-d or they are living a useless life of vanity and futility.