Hamlet compares himself to Fortinbras in Act IV, scene iv, as he commiserates over the fact that he has yet to act on his pledge to take revenge for his murdered father.
He says he has "... cause and will and strength and means / To do't" and is baffled by why he hasn't acted yet. Even young Fortinbras, he says, who is "a delicate and tender prince," takes action to avenge his own father even though his great risk produces little gain "When honor’s at the stake." Hamlet's honor is certainly at stake too since he has "a father killed, a mother stained." Hamlet says he is inspired by Fortinbras's iron will and resolute determination, thus he vows to have only "bloody" thoughts from now on.
Sith I have cause and will and strength and means
To do't. Examples gross as earth exhort me:
Witness this army of such mass and charge
Led by a delicate and tender prince,
Whose spirit with divine ambition puff'd
Makes mouths at the invisible event, (IV.iv)
In Act V, scene ii, Hamlet compares himself to Laertes as being like himself since they are both acting to avenge the murders of their fathers. Hamlet, more than anyone in the play, understands what Laertes is suffering. Hamlet says to Horatio, "I am very sorry ... / That to Laertes I forgot myself; / For, by the image of my cause, I see / The portraiture of his:...." Hamlet says he and Laertes are alike in misery.
But I am very sorry, good Horatio,
That to Laertes I forgot myself;
For, by the image of my cause, I see
The portraiture of his: I'll court his favours.
But, sure, the bravery of his grief did put me
Into a towering passion. (V.ii)