Dirk Gently was a series of books written by Douglas to show he could do things other than science-fiction. They quickly entered the realms of science-fiction. Spot the irony.
There are two books in this series:
A third book, The Salmon of Doubt, was being worked on at the time of Douglas' death. This was never completed - but the book that was eventually released of the same name contains an unfinished version of the story.
The phrase "the long dark tea-time of the soul" appears in Chapter One of Life, the Universe and Everything. Wowbagger the Infinitely Prolonged is described as being eventually ground down by the Sunday afternoons, and "as you stare at the clock the hands will move relentlessly on to four o'clock, and you will enter the long dark tea-time of the soul".
According to a posting on alt.fan.douglas-adams: