In Act 4, Scene 4, Hamlet, who is on his way to England, encounters a Captain in Fortinbras' army and asks where they are going. The officer explains:
Truly to speak, and with no addition,
We go to gain a little patch of ground
That hath in it no profit but the name.(20)
To pay five ducats, five, I would not farm it;
Nor will it yield to Norway or the Pole
A ranker rate, should it be sold in fee.
Why, then the Polack never will defend it.
But the Captain answers:
Yes, it is already garrison'd.
This example leads Hamlet to reflect on his own pressing problem, which is what occupies most of his thoughts from the time he learns about his father's murder. He thanks the Captain and then indulges in a soliloquy which contains the answer to the posted question.
Examples gross as earth exhort me.
Witness this army, of such mass and charge,
Led by a delicate and tender prince,(50)
Whose spirit with divine ambition puff'd,
Makes mouths at the invisible event,
Exposing what is mortal and unsure
To all that fortune, death, and danger dare,
Even for an eggshell. Rightly to be great(55)
Is not to stir without great argument,
But greatly to find quarrel in a straw
When honour's at the stake.
To be heroic is not to go out like Fortinbras looking for quarrels and opportunities to prove one's self heroic. It is to exercise self-restraint unless and until one has an important and an honorable cause. Hamlet sees Fortinbras as an immature lad who is only interested in making a name for himself. Meanwhile this delicate and tender prince is not only risking his own life but risking the lives of all his followers in addition to the lives of the men who have garrisoned the "little patch of ground" which is the object of all this upcoming bloody engagement.
Hamlet is showing his good sense and his greater maturity. However, he reminds himself that he does have a good cause for assassinating Claudius and berates himself, as he has been doing all along in his soliloquies, for not going ahead and doing what needs to be done. Shakespeare keeps reminding his audience of the prime motivation as well as the frustrating procrastination of his protagonist. Hemlet can see that in some ways he is smarter than Fortinbras but, at the time time, in some ways it is Fortinbras who is smarter. This may be why Hamlet nominates Fortinbras to be the new king of Denmark after Hamlet has finally completed his mission of killing King Claudius and is himself dying of the poisoned wound he received in the duel with Laertes.
The encounter with Fortinbras' army in Act 4, Scene 4 makes a strong impression on Hamlet. He concludes his soliloquy with these words, which show that the climax of the play must be drawing near:
O, from this time forth,
My thoughts be bloody, or be nothing worth!
William Shakespeare in his play "Hamlet" portrays a far more complex protagonist than that of most heroic epics. In ancient or medieval epics, the great heroes, such as Achilles, Hercules, or Beowulf, tend to be most notable for their martial prowess. We see them on the battlefield leaving a trail of blood and corpses in their wake, and glorying in the thrill of battle. Hamlet, by contrast, is a reluctant hero, doing the duty imposed on him by his father's ghost somewhat hesitantly. He does not naturally appear inclined either to violence or even to decisive action, having more a melancholic and reflective than active nature, but circumstances force the role of avenger upon him.
Unlike most more typical heroes, Hamlet does not glory in or even enjoy his heroic actions. In his soliloquies he mainly expresses deep unhappiness, verging on the suicidal. His great moral virtue is that he persists in what he sees as his duty despite his discomfort. In a sense, that makes him rather more heroic than the characters of epics who enjoy the adrenaline rush of battle and go to battle willingly.