One important theme in Hamlet is acting. Who is acting, who isn't, and what characters are presenting a fake face or are being real with those around them. Hamlet, is especially difficult to read because at times it doesn't even seem as though he knows whether he's acting or not. However, we are given an effective means of deriving when Hamlet is or isn't acting.
While instructing the actors on how to do their job, Hamlet states:
"Be not too tame neither; but let your own discretion be your
tutor. Suit the action to the word, the word to the action; with
this special observance, that you o'erstep not the modesty of
nature: for anything so overdone is from the purpose of playing..."
By telling the actors to be neither tame, nor to overact, Hamlet creates a means for us to tell when he is acting and when he isn't. In moments of intense emotion, whether it be anger or depression, Hamlet drops his facade. During his first soliloquy, we get a feeling of intense depression, a sign that he's not acting, because he seems to be rather 'too tame.' Likewise, when he's confronting his mother, intense emotion destroys the careful caricature that he's been creating. We hear his earnest pleas and see him for who he really is. Again, we know he's not acting because he becomes so intense that he drops discretion.
So, I'd argue that by using Hamlet's own description of acting, we can get an accurate view of when he is and isn't acting throughout the play, which could then be used to analyze his more 'insane' moments to determine if he really is crazy or just acting.