"I could be bounded in a nutshell, and count myself a king of infinite space, were it not that I have bad dreams." - Hamlet, II.ii
What does this mean? Not just the obvious, literal explanation, because I understand all the words in their context. But what is Hamlet saying about his mental landscape? What are his bad dreams?
The meaning of this passage is that Hamlet is a person who is (or would be, in other circumstances) most comfortable living inside his own head. He likes to think and imagine. He is a person of thoughts, not so much of deeds (like Laertes or Fortinbras).
But in these circumstances, his thoughts are troubled so he does not really want to live in his head. The bad dreams are the conflict between his desire to kill Claudius and his feeling that he should not do so.
So, we are seeing that Hamlet's mental landscape is unsettled. Normally, it is a pleasant place, but now it is disordered by the murder of his father.
Hamlet has been, up to this point, a relatively sane individual. He seemed to do all the expected things for a young prince. I think that the clues in this passage are about his royalty and ambition, and, most of all, his desire for revenge.
Bad dreams are a common occurrence in Shakespeare (such as Lady Macbeth's pathological dreams) and often portend of or are the consequence of murder. That Hamlet is having bad dreams shows that he is out of balance; he is overwhelmed by both grief and a desire for a revenge -- though repelled that it is his uncle and mother's husband who must be the recipient of the revenge -- coupled with his revulsion at the actions of his mother. The fact that he is having bad dreams means that he is troubled, and it is a foreshadowing of the bad deeds that are yet to come in the play.
His main thrust is that he doesn't have to be king to be happy -- he was contented with his father being king, and perhaps even would be reconciled to Claudius being on the throne if he could rid himself of the need for revenge (egged on by the ghost of his father) and also of his deep-seated feeling that something is wrong at the Danish court. He cannot resolve any of his feelings about his dead father or his mother's betrayal. These are the things that he would most like to rid himself of -- and then he would be free and happy, a "king" of his own heart and mind again.
I could restrict my purview to a very narrow scope where I rule and falsely consider myself the King of All ... but alas I am haunted by such a trick and peace does not visit my soul.
he is tortured by the predicament of his fathers unholy murder. Hence the bad dreams, he also cannot become king of Elsinore without killing Claudius. So the infinite space is Denmark, the dreams are of his father.