What Hamlet actually says in Shakespeare's play of the same name is:
A villain kills my father, and for that,
I, his sole son, do this same villain send
To Heaven. (Act 3.4.76-78)
There is no mention of Hamlet being afraid of death or hell, here. He mentions his father's state, a state similar to purgatory during which his sins must be burnt and purged, and he compares this to sending Claudius to heaven by killing him while he's confessing his sins. But Hamlet doesn't talk about his own fate.
Furthermore, Hamlet's famous "To be or not to be" speech (Act 3.1) is more of a rumination or contemplation on existence, an intellectual process being revealed, than it is a speech about Hamlet being afraid of death. To be is to exist. Hamlet is reasoning out the question of whether existence is worth the trouble, when one considers all of its hardships and trials. He concludes that if one were absolutely sure about what waited on the other side of death, existence would not be worth the trouble. But since the afterlife is an unknown, one might as well continue existing.
Basically, I suggest Hamlet is not afraid of death. In fact, he suffers from depression or melancholy most of the play and he feels that death might be welcome. The main things that Hamlet is afraid of are acting before his actions are completely and fully thought out, and killing an innocent man.