Hamlet is not so much crazy as he is terrified, grieving, and unsure of those around him. Political intrigue abounds at court, but given the circumstances it is exponential for Hamlet. He is grieving the loss of his father, dealing with the supernatural element of the ghost, frightened that his mother and uncle may have had something to do with his father's death (and that others around him conspired to do so). If he were insane he would not have been able to strategize to get his uncle and mother to confess.