Shakespeare makes use of many literary devices in Hamlet and all his plays (and sonnets) which add drama and intensity to many of the scenes and descriptions. This allows him to excite and shock his audience using, to name a few, metaphor, allusion, irony, personification and, notably antithesis which is present in Hamlet's famous and regularly repeated words; "To be, or not to be, that is the question," (III.i.56). Expressing such contrary ideas in this way has inspired many.
Personification attributes human characteristics to creatures and inanimate objects and even events. Death, murder and deception are regularly personified and the personification often makes the reality of it all the more severe. Death is ever present in Hamlet and, in Act I, as the ghost, or apparition, repeatedly appears the intention is for the audience to become increasingly involved in the plot so they too are almost part of the performance.
In Act I, scene i, Horatio begs the ghost to speak and to unburden himself if perhaps, he cannot rest because, in life, he "extorted treasure in the womb of the earth," (137). Earth is clearly personified as a woman who may then be part of the deceit, in hiding these so-called "treasures;" much like his current understanding of his own mother's betrayal. This use of personification then foreshadows events that will follow concerning Hamlet's mother's impending marriage to her brother-in-law.
The whole kingdom mourns the death of Hamlet's father, "in one brow of woe," (I.ii.4). A brow or forehead is often drawn and furrowed, the frown revealing the concern. Personification ensures that the full extent of the grief is not underestimated.
In Act I, scene iv, Hamlet questions the vision as he knows that his father is dead and wonders how his father can be present when Hamlet saw for himself, the "canonized bones," (46). The sepulcher is personified as it has opened, "his ponderous and marble jaws," (50). Note "his jaws," not its, confirming the human characteristics. Personification helps the audience understand the magnitude of events and to join the characters in their anxiety and despair.
As you probably know, personification is a type of metaphor that gives human characteristics to a non-human object. Several can be found in the first chapter of Hamlet.
In Act One, Scene One, Line 115, Horatio states that
"The graves stood tenantless, and the sheeted dead / Did squeak and gibber in the Roman streets;"
Later, in Line 118
"...and the moist star / Upon whose influence Neptune's empire stands / Was sick almost to doomsday..."
Still later in Scene One, Line 160, Marcellus responds that
"The bird of dawning singeth all night long, / And then they say no spirit dare stir abroad; / The nights are wholesome, then no planets strike, / No fairy takes, nor witch hath power to charm..."
Shortly after, in Line 166, Horatio replies
"But look the morn in russet mantle clad / Walks o'er the dew of yon high eastward hill."