On a bleak morning in the autumn of 2015, Peter Farquhar, a retired English professor and novelist, wrote in his journal that he feared he was spiraling into madness.