Meaning
A legal, not medical, idea. It covers any internal condition that impairs reason, memory or understanding, whether mental or physical, permanent or temporary. That is why epilepsy and some effects of diabetes can count.
Example
A brain tumour or hardened arteries affecting the mind can be a disease of the mind for insanity.
Where it comes from
R v Kemp (1957), R v Sullivan (1983), R v Hennessy (1989).