Abu Rib‘i Hanzhalah ibn Ar-Rabī‘ al-Usaydi, one of the scribes of the Messenger of Allah (may Allah’s peace and blessings be upon him) reported: I met Abu Bakr (may Allah be pleased with him) and he said: 'How are you?' I said: 'Hanzhalah has turned into a hypocrite.' He said: 'Glory be to Allah, what are you saying?' I said: 'When we are in the company of the Messenger of Allah (may Allah's peace and blessings be upon him), he reminds us of Paradise and Hellfire as if we are seeing them with our very eyes, and when we depart from his company, we attend to our wives, children, and business, and we forget much of that.' Abu Bakr said: 'By Allah, we do experience the same.' So I and Abu Bakr went to the Messenger of Allah (may Allah's peace and blessings be upon him) and I said: 'O Messenger of Allah, Hanzhalah has turned into a hypocrite.' Thereupon the Messenger of Allah (may Allah's peace and blessings be upon him) said: 'And how is that?' I said: 'O Messenger of Allah, when we are in your company, you remind us of Hellfire and Paradise as if we are seeing them with our own eyes, then when we depart from you we attend to our wives, children, and business, and we forget much of that.' Thereupon the Messenger of Allah (may Allah's peace and blessings be upon him) said: 'By Him in Whose hand is my soul, if your state of mind remains the same as it is in my presence and you are always busy in remembrance (of Allah), the angels will shake hands with you in your beds and in your paths but, Hanzhalah, time (should be devoted to prayer and meditation) and time (should be devoted to worldly affairs).' He said this thrice."
Authentic hadith -
Narrated by Muslim