The figure of speech that directly addresses an absent person or abstraction, as in "O Death, where is thy sting?" is apostrophe. In rhetoric and literature, a speaker turns away from the immediate audience and addresses someone or something that cannot normally reply.
The addressee may be an absent person, a dead person, a deity, an abstract idea, an emotion, or an inanimate object. The conventional opening "O" often signals the device, as in appeals to Death, Time, Love, or the Muses. The question about Death comes from the New Testament, specifically 1 Corinthians 15:55, in the King James Bible's wording.
Apostrophe is especially common in poetry, drama, sermons, and elevated speeches because it makes an inner feeling sound like a direct encounter. Shakespeare frequently uses it; in "Macbeth," for example, Macbeth addresses the absent dagger he imagines before murdering Duncan.
The term is unrelated to the punctuation mark that shares its name, although both words ultimately involve the idea of turning or diverting. Apostrophe differs from personification: personification gives human qualities to something nonhuman, while apostrophe describes directly addressing that entity. A passage can use both at once.