How will people react to your death?

Chapter 34 of East of Eden by John Steinbeck is one of the shortest in the entire novel, but it had a powerful effect on me. Here's an excerpt:

I remember clearly the deaths of three men. One was the richest man of the century, who, having clawed his way to wealth through the souls and bodies of men, spent many years trying to buy back the love he had forfeited and by that process performed great service to the world and, perhaps, had much more than balanced the evils of his rise. I was on a ship when he died. The news was posted on the bulletin board, and nearly everyone received the news with pleasure. Several said, "Thank God that son of a bitch is dead."

Then there was a man, smart as Satan, who, lacking some perception of human dignity and knowing all too well every aspect of human weakness and wickedness, used his special knowledge to warp men, to buy men, to bribe and threaten and seduce until he found himself in a position of great power. He clothed his motives in the names of virtue, and I have wondered whether he ever knew that no gift will ever buy back a man's love when you have removed his self-love. A bribed man can only hate his briber. When this man died the nation rang with praise and, just beneath, with gladness that he was dead.

There was a third man, who perhaps made many errors in performance but whose effective life was devoted to making men brave and dignified and good in a time when they were poor and frightened and when ugly forces were loose in the world to utilize their fears. This man was hated by the few. When he died the people burst into tears in the streets and their minds wailed, "What can we do now? How can we go on without him?" 

In uncertainty I am certain that underneath their topmost layers of frailty men want to be good and want to be loved. Indeed, most of their vices are attempted short cuts to love. When a man comes to die, no matter what his talents and influence and genius, if he dies unloved his life must be a failure to him and his dying a cold horror.

It seems to me that if you or I must choose between two courses of thought or action, we should remember our dying and try so to live that our death brings no pleasure to the world.

There is only one story. All novels, all poetry, are built on the never-ending contest in ourselves of good and evil. And it occurs to me that evil must constantly respawn, while good, while virtue is immortal. Vice always has a new fresh young face, while virtue is venerable as nothing else in the world is.

Just before that, Steinbeck had said that after a man has died:

Envies are gone, and the measuring stick is: "Was he loved or was he hated? Is his death felt as a loss or does a kind of joy come of it?"

It reminds me of a verse in the book of Proverbs:

When the righteous prosper, the city rejoices; when the wicked perish, there are shouts of joy.

Proverbs 11:10