A wonderful post over at Grim Reviews details two excellent books of spectral theory: Warnings to the Curious: A Sheaf of Criticism on M.R. James by master anthologizer S.T. Joshi and The Ghost Story 1840-1920: A Cultural History by Andrew Smith. Both sound like absolute musts for anyone interested in the mechanics of good ghost story writing.
And for those who prefer their theory in bite-sized morsels, here's an old post of mine in which I share many of M.R. James' personal theories and demonstrate the Usefulness and Importance of Dots.