Ecclesiastes 2:15-17 Complete Jewish Bible (CJB)
15 So I said to myself, “If the same thing happens to the fool as to me, then what did I gain by being wise?” and I thought to myself, “This too is pointless. 16 For the wise man, like the fool, will not be long remembered, inasmuch as in the times to come, everything will long ago have been forgotten. The wise man, no less than the fool, must die.”
17 So I came to hate life, because the activities done under the sun were loathesome to me, since everything is meaningless and feeding on wind.