In Hamlet Act II, scene ii, Hamlet remembers that he loves acting, but he forgets, until the end of the act, that he is to be an agent of vengeance.

Remember that from Act I and Act II, scene i, Hamlet has assumed the role of "Crazy Hamlet" in order to hide his secret persona of "Revenge Hamlet." In reality, Hamlet does not want to play either role; instead, he is acting on the orders of his Ghost-father. In reality, Hamlet is happiest as "Player Hamlet," a man of the stage, a lover of drama. Here, when the players come, Hamlet remembers his love for acting:

As by lot, God wot, and then, you know, It came to pass, as most like it was.—

Hamlet remembers the faces of the old players:

By'r lady, your ladyship is nearer to heaven than when I saw you last by the altitude of a chopine. Pray God, your voice, like a piece of uncurrent gold, be not cracked within the ring. Masters, you are all welcome.

Then, at the end, Hamlet remembers that he is supposed to kill Claudius. During the Player King's monologues, Hamlet has forgetten all about vengeance. In the scene-ending soliloquy he says:

O, vengeance! Why, what an ass am I!

It doesn't take a psychologist to point out that Hamlet is happiest among the players and unhappiest among the King, Queen, and his advisors (Polonius) and spies (Rosencrantz and Guildenstern). He remembers lines, prayers, and faces from years ago, when he was a student and actor, but he cannot remember that he is supposed to put on an antic disposition as an avenger.

Polonius:And then, sir, does he this--he does--what was I about to say? By the mass, I was about to say something: where did I leave?

from Scene 2

Queen Gerrtrude:Good gentlemen, he hath much talk'd of you; And sure I am two men there are not living To whom he more adheres. If it will please you To show us so much gentry and good will As to expend your time with us awhile, For the supply and profit of our hope, Your visitation shall receive such thanks As fits a king's remembrance.

Hamlet:One speech in it I chiefly loved: 'twas Aeneas' tale to Dido; and thereabout of it especially, where he speaks of Priam's slaughter: if it live in your memory, begin at this line: let me see, let me see-- 'The rugged Pyrrhus, like the Hyrcanian beast,'-- it is not so:--it begins with Pyrrhus:--