Anas b. Malik reported Allah's Messenger (ﷺ) as saying
Endurance is to be shown at the first blow.
Anas b. Malik reported that Allah's Messenger (ﷺ) came to a woman who had been weeping for her (dead) child, and said to her
Fear Allah and show endurance. She (not recognising him) said: You have not been afflicted as I have been. When he (the Holy Prophet) had departed, it was said to her that he was the Messenger of Allah (ﷺ), she was mortally shocked. She came to his door and she did not find doorkeepers at his door. She said: Messenger of Allah. I did not recognise you. He said: Endurance is to be shown at first blow, or at the first blow.
A hadith like this is narrated with the same chain of transmitters but with the addition of these words
" The Apostle of Allah (ﷺ) happened to pass by a woman (who was sitting) by the side of a grave."