Sunan an-Nasa'i, Book 27, Hadith 116 (In-Book)

It was narrated from Safiyyah bint Abi 'Ubaid from one of the wives of the Prophet, and from Umm Salamah, that the Prophet said: "It is not permissible for a woman who believes in Allah and the Last Day to mourn for anyone who dies for more than three days except for a husband; she should mourn for him for four months and ten (days)."

أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ الصَّبَّاحِ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ سَوَاءٍ، قَالَ أَنْبَأَنَا سَعِيدٌ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنْ صَفِيَّةَ بِنْتِ أَبِي عُبَيْدٍ، عَنْ بَعْضِ، أَزْوَاجِ النَّبِيِّ صلى الله عليه وسلم وَعَنْ أُمِّ سَلَمَةَ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يَحِلُّ لاِمْرَأَةٍ تُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الآخِرِ تَحِدُّ عَلَى مَيِّتٍ أَكْثَرَ مِنْ ثَلاَثَةِ أَيَّامٍ إِلاَّ عَلَى زَوْجٍ فَإِنَّهَا تَحِدُّ عَلَيْهِ أَرْبَعَةَ أَشْهُرٍ وَعَشْرًا ‏" ‏ ‏.‏

sunnah.com