The French publisher Gallimard has a short biography of Guy de Maupassant on its website. The last lines read,
Vers 1885, Maupassant ressent les premiers symptômes de la maladie nerveuse qui l'emportera. Il sombre dans la tristesse, il se croit entouré d'êtres invisibles. C'est à cette époque qu'il écrit «Le Horla». On finira par l'interner dans une clinique où il mourra, dix-huit mois plus tard, le 6 juillet 1893.
Translation:
Around 1885, Maupassant feels the first symptoms of the mental illness that will get the better of him. He sinks into sadness, he thinks he is surrounded by invisible beings. It is at that time that he writes "The Horla". He will eventually be committed to a hospital, where he will die eighteen months later, on 6 July 1893.
(The future tenses are a literal rendering of the French original.)
The Horla was first published in 1886; a revised version was published in 1887. However, it is not the only of Maupassant's stories that of evokes the themes of madness and the supernatural. What is not clear based on what I have read so far is whether there was a biographical connection between Maupassant's own mental health and his interest in these themes. More specifically, did Maupassant write more stories about madness, the supernatural or both after 1885 than before?