Alas, poor Yorick!

Hamlet's interest in the skull of Yorick shows his introverted character. The introvert, according to C. G. Jung, who coined the terms "introvert" and "extravert," is interested in the subject, whereas the extravert is interested in the object. The skull does not especially interest Hamlet as an object, as can be seen from the train of thoughts he expresses while he is holding it up in front of him.

Alas, poor Yorick! I knew him, Horatio: a fellow of infinite jest, of most excellent fancy. He hath borne me on his back a thousand times. And now how abhorred in my imagination it is! My gorge rises at it. Here hung those lips that I have kissed I know not how oft. Where be your gibes now? your gambols? your songs? your flashes of merriment, that were wont to set the table on a roar? Not one now to mock your own grinning? Quite chop-fallen? Now get you to my lady's chamber, and tell her, let her paint an inch thick, to this favour she must come. Make her laugh at that. 

Hamlet is thinking of himself--his own thoughts, memories, and impressions--when he says, "I knew him," and "He hath borne me on his back a thousand times," "how abhorred in my imagination it is!" "Here hung those lips I have kissed I know not how oft," etc. It is because of his ceaseless introspection that Hamlet is not able to act effectively in the real world. His thinking interferes with his emotions. He is the exact opposite of the extremely extraverted Laertes, who is guided by his emotions and acts impulsively and rashly.

The introvert sees everything that is in any way valuable to him in the subject; the extravert sees it in the object. This dependence on the object seems to the introvert a mark of the greatest inferiority, while to the extravert the preoccupation with the subject seems nothing but infantile autoeroticism. So it is not surprising that the two types often come into conflict.  - C. G. Jung

Hamlet will not end up killing King Claudius until he momentarily loses his customary repression of his emotions and releases all his pent-up rage.

In this famous scene, Shakespeare seems to have wanted to show the contrast between the object which Hamlet is holding directly in front of him and the subjective thoughts which that object is capable of arousing. "Alas, poor Yorick!" characterizes Hamlet very effectively. Everything causes him to think, and once he starts thinking he can't stop.