The Religious Experience of Philip K. Dick is a short comic by Robert Crumb, published in Weirdo comics #17 in 1986. It is a detailed account of the Gnostic Christian experiences Philip K. Dick had in March 1974.
During that time, PKD felt he was not losing touch with reality, but actually gaining a better understanding of it. This view is supported by the fact that the 'inner voice' that talked to him gave a detailed description of his son's birth defect, which would have killed him had Dick not immediately taken him to a hospital. The opposite view, stating that Dick was suffering from an acute psychotic break, is supported by his strange conceptions - such as that we are really living in the times of the Roman Empire. Dick was an early Christian, persecuted by the Romans, and had to devise all kinds of secret ways to communicate with other Gnostics.
PKD's later books - in fact, everything he wrote after 1974 - are strongly influenced by this experience, notably VALIS, The Divine Invasion, The Transmigration of Timothy Archer and, of course, his Exegesis.
My take is that PKD had a genuine mystical experience, which he over-interpreted due to the breakdown of his already fragmented psyche and overexposure to and obsession with early Christian ideals. In my opinion, the division between mystical experience and psychosis is not clear at all. Apparently, his level of functioning remained the same - or better - for quite some time after his initial experience, but later deteriorated.
The comic is available on the internet at http://www.philipkdickfans.com/weirdo.htm