Hmmm. This is really the old "fake it till you make it" principle, isn't it? Except that it's much more eloquently expressed:
To be sure, our mental processes often go wrong, so that we imagine God to have gone away. What should be done then? Do exactly what you would do if you felt most secure. Learn to behave thus even in deepest distress and keep yourself that way in any and every estate of life. I can give you no better advice than to find God where you lost him.