Freud may have done it first, but in this article from Psychiatric Times the notion of psychoanalyzing Hamlet returns, looking at literature as a basic science of psychiatry.
I love this idea. You know that your characters have acquired the sort of depth you’re striving for if psychiatrists can analyze them using the same techniques they might use of non-fictional people.