In Shakespeare's "Hamlet," much of Hamlet's inaction stems from the fact that the whole of the court is corrupt; there are flaws running throughout. While it seems natural that Hamlet would obey the ghost and punish Claudius, an emblem of the corrupt society, the flaw also runs down through time, into the past. After all, Hamlet's father, the ghost, is in purgatory doing penance for sins that resemble those that he calls upon Hamlet to punish. Indeed, "there is something rotten in Denmark." The evil in the world has its roots in the race. So, there is no use pretending that ridding Denmark of Claudius will rid Denmark of its evil.
Hamlet's depression stems from this knowledge, too, for his realization of the depth of evil brings on his pessimistic view of man. As Rebecca West states in her criticism, "The Nature of Will,"
...what excites Shakespeare in this play is the impossibility of conceiving an action which could justly be termed virtuous, in view of the bias of original sin.
Thus, in his search for a virtuous act, Hamlet engages in dilatory self-debate. He considers suicide, but fears going to hell if he does so. Yet, his description of the forged letter to the King of England that effects the deaths of Rosencrantz and Guildenstern reveals a perverse determination to kill both soul and body:
An earnest conjuration from the king--/As England was his faithful tributary;/As love between them like the plam might flourish/As peace should still her wheaten garland wear,/And stand a comma 'tween their amities,/And many such-like As-es of great charge,--/That, on the view and knowing of these contents,/Without debatement further, more or less,/He should the bearers put to sudden death,/Not shriving-time allow'd. (V,ii,38-46)
From what he describes as "in my heart there was a kind of fighting" (V,ii,4), Hamlet determines to change the future of Denmark through political action. After the future rulers from the Danish court lie dead, Hamlet's last words choose a ruler for the people of Denmark:
O, I die, Horatio;/....But I do prophesy th'election lights/On Fortinbras: he has my dying voice,/So tell him, with the occurents, more and less, /Which have solicited--the rest is silenced (V,ii,332-337)
As he dies, Horatio says, "Now cracks a noble heart" (V,ii,338). For, in his final act, Hamlet has found the moment that he has sought: one in which he surrenders not to folly, but displays wisdom, political wisdom. He has rid Denmark of its evil, its corrupt court. He has, as Ms. West proposes, committed "an action which could be termed virtuous in view of the bias of original sin."
I believe that the main obstacles that stand in the way of Hamlet and his revenge are:
- The fact that the ghost told him not to take revenge on his mother and not to tell that he has seen the ghost.
- His own personality.
Because Hamlet cannot tell everything he knows a lot of how he is acting is going to seem strange. Everyone is going to think he's crazy. And this is going to interact with his personality to cause problems. He's not the kind of guy who can just not care what people think -- he broods about that kind of stuff too much.
I think Hamlet sees these as major problems, which is why he spends so much time agonizing over what to do.