In Act V, Scene 2, Hamlet talks to his friend Horatio and tells him that there is a "divinity" that orders man's end. He also expresses a premonition after having accepted King Claudius's invitation for him to duel Laertes.
Hamlet first tells Horatio that he felt a "fighting" in his heart which awakened him on the ship to England. Because of this feeling, he arose and found the letter that Rosencrantz and Guildenstern carried. By forging a different letter, Hamlet averted the plans of Claudius to have him killed in England, and Rosencrantz and Guildenstern died, instead. Further, Hamlet tells Horatio that there is "a divinity" that determines man's end; that is, he observes that fate will make things occur and all man can do is be ready for it.
There’s a divinity that shapes our ends,
Rough-hew them how we will— (5.2.10-11)
Later in this scene, Osric
, a courtier, gives Hamlet an invitation from King Claudius for Hamlet to duel Laertes. After Osric departs, Hamlet tells Horatio of a premonition that he has--
It is but foolery, but it is such a kind of gain-giving as would perhaps trouble a woman. (5.2.190)
So, Horatio suggests to Hamlet that if he feels any doubts about fighting a duel with Laertes, he should refuse, but Hamlet insists that he believes in fate, so what is going to happen will occur sooner or later, anyway:
If it be not to come, it will be now. If it be not now, yet it will come—the readiness is all. Since no man of aught he leaves knows, what is’t to leave betimes? Let be. (5.2.195-197)
Hamlet agrees to duel Laertes because he feels that there is no postponement for what is meant to happen. Besides, he tells Horatio, he has practiced and is prepared to fight Laertes as best he can. After observing the fortitude of Fortinbras
, who risks all "for an eggshell" (4.4.53), Hamlet, who earlier has declared himself "Hamlet the Dane" (5.1.228), prepares himself for what fate will bring.