Published in 1621, Robert Burton's Anatomy of Melancholy was originally regarded as a medical textbook on the subject of melancholia, or, as we regard it today, clinical depression. Today it is also regarded highly as a form of literature.
Shakespeare most likely did not consult Burton's text, but instead a 1586 treatise by the physician and clergyman Timothie Bright. However, because Hamlet is considered one of the most famous melancholics, scholars are still interested in the Anatomy of Melancholy due to its early studies on the subject.