"Thanatopsis" is presented as an elegy, a type of poem that starts with a melancholy tone but ends in a more uplifting way. There are several key shifts in tone in the poem that indicate the speaker views death more positively.
The first shift occurs at lines 31-33 when the speaker states, "Yet not to thine eternal resting-place / Shalt thou retire alone, nor couldest thou wish / Couch more magnificent." While the previous section speaks about the approach of death and how death is the great equalizer, taking both poor and rich, young and old, popular or not, this shift begins to comfort the audience about how our destinies are tied together with those who have gone before us. The speaker states that we will be buried "With patriarchs of the infant world,--with kings, / The powerful of the earth,--the wise, the good, / Fair forms and hoary seers of ages past" (34-36). So it does not matter our station or position on this earth alive, we will all be equal in death.
The second shift occurs at the end of the poem when the speaker tells the audience:
So live, that when thy summons comes to join
The innumerable caravan which moves
To that mysterious realm...
approach thy grave
Like one who wraps the drapery of his couch
About him, and lies down to pleasant dreams. (73-81)
The speaker's advice is to live our lives, not waiting to die, but living instead. We should not worry about our position in life or who we have in our lives because we have so much waiting for us in death. He also suggests that Nature will be our guide and our comfort, both in life and death.