The full quote is found in Dreams of a Spirit-Seer (originally published as Träume eines Geistersehers, 1766) by Immanuel Kant, available through Wikisource.
Kant expresses – with his dry sense of humour, but not without a certain Lovecrafty ominousness – the sceptic’s opinion in the very next chapter: “while I have not made insanity to be the cause of an imagined communion with spirits, I have yet connected the two by considering insanity as the natural consequence of such communion”.
The practical philosopher concludes with a concession to the faithful, as well as the faithless:
Human reason was not given strong enough wings to part clouds so high above us, clouds which withhold from our eyes the secrets of the other world. The curious who inquire about it so anxiously may receive the simple but very natural reply, that it would be best for them to please have patience until they get there. But as our fate in the other world probably depends very much on the manner in which we have conducted our office in the present world, I conclude with the words with which Voltaire, after so many sophistries, lets his honest Candide conclude: “Let us look after our happiness, go into the garden, and work.”