Doesn't Ecclesiastes 3:19 teach that there is no difference between men and animals?
"Moreover I saw under the sun: In the place of judgment, wickedness was there; and in the place of righteousness, iniquity was there. I said in my heart, "God shall judge the righteous and the wicked, for there is a time there for every purpose and for every work." I said in my heart, "Concerning the condition of the sons of men, God tests them, that they may see that they themselves are like animals." For what happens to the sons of men also happens to animals; one thing befalls them: as one dies, so dies the other. Surely, they all have one breath; man has no advantage over animals, for all is vanity. All go to one place: all are from the dust, and all return to dust" (Ecclesiastes 3:16-20).
Solomon's point is that men, left on their own, have a strong tendency to behave as poorly as animals. Instead of aiming for a higher moral standard, they place their personal, bodily desires above what their head knows to be righteous. This is not a praise of animal behavior, but a condemnation of man's behavior because God expects more out of men than He does animals.
Man shares many similar traits with animals. We are alive, that is we both have souls in the biblical terminology, but man has something that animals don't have. "So God created man in His own image; in the image of God He created him; male and female He created them" (Genesis 1:27). Mankind was made to share a characteristic of God. "God is Spirit, and those who worship Him must worship in spirit and truth" (John 4:24). God is not a physical being but a spiritual one. Like God, we were created with spirit. Animals are above plants because they have soul and plants do not. Man is above animals because he has a spirit along with his body and soul, which animals do not. "Now may the God of peace Himself sanctify you completely; and may your whole spirit, soul, and body be preserved blameless at the coming of our Lord Jesus Christ" (I Thessalonians 5:23).
To remind men that while we share a characteristic of God we still are not God, we experience death just as the animals. For all our "advantage" in having a spirit, we all die. Thus God's point remains that if man is on his own, he decays into acting like an animal and he is unable to avoid death. But the key is that this happens when we are on our own. "What is man that You are mindful of him, And the son of man that You visit him?" (Psalm 8:4). The aim of the argument Solomon is presenting is that we don't have to be on our own. We can rise above an animalistic nature. We must die, but we don't have to remain dead. Being on our own is futility. We need our God.