Hamlet was indeed a very sane man. He was only feigning madness to further his own plans for revenge. His words were so cleverly constructed that others will perceive him as mad. It is this consistent cleverness that is the ultimate evidence of his complete sanity. Can a mad person be so clever? No, a mad person cannot. Hamlet is sane and brilliant.
After Hamlet, Horatio, and Marcellus see the ghost, Hamlet tells Horatio that he is going to "feign madness". If Horatio is to notice Hamlet acting strange it is because he is putting on an act. "How strange or odd some'er I bear myself/(As I perchance hereafter shall think meet/To put an antic disposition on)/That you, at such times seeing, never shall,/With arms encumbered thus, or this headshake ,/Or by pronouncing of some doutful phrase,/As "Well,well,we know," or "We could an if we/would,"/Or "If we list to speak," or "There be an if they/might,"/Or such ambiguous giving-out, to note/That you know of me-this do swear,/(I,v,190-201).Hamlet states that from this point forward I may act weird but to ignore my acts of madness for they are just that, acts, and are in no way a sign of true madness. Only a sane and rational person could devise such a plan as to act insane to convince others that he is insane when he actually has complete control over his psyche.
Hamlet only acts mad when he is in the presence of certain characters. When he is around Polonius, Claudius, Gertrude, Ophelia, Rosencrantz, and Guildenstern he acts completely irrational. When Hamlet is around Horatio, Bernardo, Fransico, the players, and the gravediggers Hamlet acts completely sane.
When Hamlet and Polonius meet in II,ii Hamlet calls Polonius a fishmonger and makes strange conversation with him. In IV,iii Hamlet refuses to tell Claudius were he has hidden the body of Polonius and goes on about how Polonius is at supper. When Hamlet encounters Gertrude in her closet, an unusual place, in III,iv. He yells at...