Just to clarify.  Gogol and de Maupassant both wrote short stories called "The Diary Of A Madman," bearing no resemblance to one another.  This episode was based on the de Maupassant story, but set in modern times in the USA.  A creepy episode, and well done.  Horror thriller, no supernatural elements.