Oh, that this too, too sullied flesh would melt, Thaw, and resolve itself into a dew, Or that the Everlasting had not fixed His canon 'gainst self-slaughter! (1.2.130-134)
O villain, villain, smiling, damnèd villain! My tables!—Meet it is I set it down That one may smile, and smile, and be a villain. At least I’m sure it may be so in Denmark. So, uncle, there you are. Now to my word. (1.5.106-109)
Yea, and perhaps Out of my weakness and my melancholy, As he is very potent with such spirits, Abuses me to damn me.(2.2.560-564)
Hamlet is in a moment of distress and deep sadness from the passing of his father. He is passing through a whirlwind of emotions because his mother has just married his uncle only one month after the death of King. Hamlet manifests his grief by describing how he wished his skin could melt away.
Hamlets father, the "Ghost", abruptly appears to hamlet, revealing that Claudius had murdered him. Hamlet immediately feels an anger to avenge the blood of his father.
A villain kills my father, and, for that, I, his sole son, do this same villain send To heaven. (3.3.78)
Hamlet has had a tremendous amount of emotions running through his mind. Now that he is re-thinking the whole situation, he is confused and thinks that the ghost may be a devil, trying to entice him to kill Claudius.
Alas, how is't with you, That you do bend your eye on vacancy And with the incorporeal air do hold discourse? (3.4.132-141)
When Hamlet blurts; "to a nunnery go" to Ophelia, he is expressing his resentment to his mother, who he feels has been unfaithful because she married his uncle.
To a nunnery, go.(3.1.153)
Hamlet is a very indecisive character, he can never decide what decision to make. When he does make a decision it is usually an act off of impulse. Hamlet own words say, "O cursed spite, that ever I was born to set it right!" Hamlet uses the excuse that he will go to heaven if he kills him if he goes to heaven.
It is evident that Gertrude cannot see the ghost that Hamlet is seeing. Therefore it is inferred that Hamlet is being delusional from the trauma received after his fathers death.