What does "a document in madness' exactly mean?

According to Etymonline, in the early 15th century "document" meant "a doctrine", but in the late 15th century,

"teaching, instruction" (senses now obsolete), from Old French document (13c.) "lesson, written evidence" and directly from Latin documentum "example, proof, lesson," in Medieval Latin "official written instrument, authoritative paper," from docere "to show, teach, cause to know,"

So "A document in madness" means a teaching, or a lesson, on madness."

Perhaps we would say "a manual on madness."