Solomon is famous for writing "vanity of vanities, all is vanity". (Ecclesiates 1:2) At the end of his life, he found no satisfaction in his work or accomplishments (2:11). He saw death as proof, because the rich and poor, wise and foolish, all die. (2:16).
He came to hate his very life. (2:17) This man, whose wisdom and wealth took a queen's breath away (1 Kings 10:4-5), whose palace took 13 years to build (1 Kings 7:1), who had 1,000 women at his disposal (1 Kings 11:3), and whose kingdom stretched from the Euphrates to the border of Egypt (1 Kings 4:21), found nothing to live for and saw death as the proof that his life had no meaning.
In contrast, a Jew named Saul met Jesus and lost all he had. He lost it gladly. He considered those things rubbish. (Philippians 3:8) Nothing was more important than gaining Christ and being found in him. He said "to live is Christ". (Philippians 1:21) He saw death as the blessing of of being with Christ. He longed to be with Christ. (Philippians 1:23)
Jesus put it simply: blessed are those who hunger and thirst after righteousness, for they shall be satisfied. (Matthew 5:6) To seek righteousness is to seek God, the only righteous one. Only those who seek after God will find satisfaction.
Solomon saw life as meaningless and death as the bitter proof of it. That was because of his pursuit of earthly things. Paul pursued heavenly things instead. He found meaning in life and saw death as the entrance to the presence of Jesus. Paul found joy in life and joyful expectation in approaching death. I want to be like Paul.