In "The Seven-Per-Cent Solution", this literary character is treated by Sigmund Freud for drug addiction
... to kick his 
cocaine addiction under the advice of Sigmund Freud (Alan Arkin)... [DOC] [TLE] The Seven Percent Solution (Literature) - TV Tropes [PAR] The Seven-Per-Cent Solution, published in 1974, is a novel-length Sherlock ... 
them) were really a cover-up for Holmes' descent into drug addiction and 
recovery.