This question is a follow up to "Why-do-we-read-kohelet-on-sukkos. The answers there failed to find any reliable source for a connection. I would like to emphasize one aspect of Kohelet - it's bleakness.
Besides general gloomy statements about the meaning of life, like the starting "הֲבֵל הֲבָלִים אָמַר קֹהֶלֶת הֲבֵל הֲבָלִים הַכֹּל הָבֶל", it has some similar discouraging proposals for a wise way of life (Ecc 7,4):
"לֵב חֲכָמִים בְּבֵית אֵבֶל וְלֵב כְּסִילִים בְּבֵית שִׂמְחָה: (Wise men are drawn to a house of mourning, and fools to a house of merrymaking).
Rashi in place:
מַחֲשַׁבְתָּם עַל יוֹם הַמִּיתָה: (They keep thinking of [the day of] death)
On the other hand, we have a contradicting motif from the Torah (Deut 27:48):
"תַּחַת אֲשֶׁר לֹא־עָבַדְתָּ אֶת־ה"א בְּשִׂמְחָה וּבְטוּב לֵבָב מֵרֹב כֹּל׃ (Because you would not serve the LORD your God in joy and gladness over the abundance of everything,
And the Gemmorah (Shabbat 30b):
"שאין שכינה שורה לא מתוך עצבות ... אלא מתוך דבר שמחה של מצוה" (the Divine Presence rests upon an individual neither from an atmosphere of sadness... but rather from an atmosphere imbued with the joy of a Mitzva)
And Rambam brings it to the Halachah (Lulav 8:15):
"הַשִּׂמְחָה שֶׁיִּשְׂמַח אָדָם בַּעֲשִׂיַּת הַמִּצְוָה וּבְאַהֲבַת הָאֵל שֶׁצִּוָּה בָּהֶן. עֲבוֹדָה גְּדוֹלָה הִיא. וְכָל הַמּוֹנֵעַ עַצְמוֹ מִשִּׂמְחָה זוֹ רָאוּי לְהִפָּרַע מִמֶּנּוּ שֶׁנֶּאֱמַר (דברים כח מז) "תַּחַת אֲשֶׁר לֹא עָבַדְתָּ אֶת ה' א' בְּשִׂמְחָה וּבְטוּב לֵבָב"."
Is there a way to reconcile Kohelet's proposals with the Mitzvah of being in Simhah, because I find it difficult to be in Simhah while visiting mourners?
The fact that Kohelet is read on THE Festival of Simhah (זמן שמחתנו) might have some relation to that.