"I said in mine heart concerning the estate of the sons of men, that God might manifest them, and that they might see that they themselves are beasts. For that which befalleth the sons of men befalleth beasts; even one thing befalleth them: as the one dieth, so dieth the other; yea, they have all one breath; so that a man hath no preeminence above a beast: for all is vanity. "-- Ecclesiastes 3:18-19
We have no preeminence over beasts WHERE DEATH IS CONCERNED.
This is what Solomon was talking about in his depressed state.
He didn't say we were beasts, he was lamenting that men don't see their vulnerable state under the Fall -- that we, like the beasts, will also die.
Solomon's depressives point toward the need of the new Covenant and the Messianic age, when Christ overcame (sin and) death, promising same to His followers.