Know that when you seek anything of your own, you will never find God, because you do not seek God purely. You are seeking something along with God, and you are acting just as if you were to make a candle out of God in order to look for something with it. Once one finds the things one is looking for, one throws the candle away. This is what you are doing.
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.