"The black dog" has been used as a metaphor for depression or sulking since at least 1790. Today it is used to denote depression and sometimes a broader range of mental illnesses. For example, in Britain the mental health charity SANE runs a Black Dog Campaign against the stigmatisation of the mentally ill, and in Australia the Black Dog Institute works to diagnose, treat and prevent mood disorders.
What is the connection, if any, between the use of the metaphor of the black dog for depression or melancholy with the black dog of British folklore?