[Machine] The Messenger of Allah ﷺ said: "It is not permissible for a Muslim woman who believes in Allah and the Last Day to mourn for a dead person for more than three days, except for a woman mourning her husband for four months and ten days." Shu'bah narrated to me, and Humeid ibn Nafi' narrated from Zaynab bint Abi Salamah, from her mother, and from a wife of the Prophet ﷺ similar to this. They reported this in the Sahih from the hadith of Shu'bah.
إِنَّ رَسُولَ اللهِ ﷺ قَالَ لَا يَحِلُّ لِامْرَأَةٍ مُسْلِمَةٍ تُؤْمِنُ بِاللهِ وَالْيَوْمِ الْآخِرِ أَنْ تُحِدَّ عَلَى مَيِّتٍ فَوْقَ ثَلَاثٍ إِلَّا الْمَرْأَةَ عَلَى زَوْجِهَا أَرْبَعَةَ أَشْهُرٍ وَعَشْرًا قَالَ شُعْبَةُ وَحَدَّثَنِي حُمَيْدُ بْنُ نَافِعٍ عَنْ زَيْنَبَ بِنْتِ أَبِي سَلَمَةَ عَنْ أُمِّهَا وَعَنِ امْرَأَةٍ مِنْ أَزْوَاجِ النَّبِيِّ ﷺ بِمِثْلِهِ أَخْرَجَاهُ فِي الصَّحِيحِ مِنْ حَدِيثِ شُعْبَةَ