Sayyiduna Anas bin Malik (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) passed by a woman who was weeping at a grave, and he (peace and blessings be upon him) said to her: "Fear Allah and be patient." She said: Leave me to my state, for you have not been struck by a calamity like mine. She did not recognise him (peace and blessings be upon him). When she was told that it was the Messenger of Allah (peace and blessings be upon him), a state like death came over her, and she came to the door of the Messenger of Allah (peace and blessings be upon him) and found no doorkeeper there. She said: O Messenger of Allah, I did not recognise you. The Messenger of Allah (peace and blessings be upon him) said: "Patience is that which is shown at the first moment of the shock."
Imam Bukhari (may Allah have mercy on him) recorded it in his Sahih from Adam bin Abi Iyas, and some reported in the hadith: "Patience is only that which is shown at the onset of the shock."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7127