كتاب الطلاق
18  
The Book of Divorce
(9)
Chapter: The Obligation to mourn during the 'Iddah following the death of one's husband, but it is forbidden to mourn for more than three days in other cases
(9)
باب وُجُوبِ الإِحْدَادِ فِي عِدَّةِ الْوَفَاةِ وَتَحْرِيمِهِ فِي غَيْرِ ذَلِكَ إِلاَّ ثَلاَثَةَ أَيَّامٍ
Sahih Muslim 1486 d

Zainab bint Abu Salama reported that when the news of the death of Abu Safyan came to Umm Habiba she sent for yellow (perfume) on the third day and rubbed it on her forearms and on her cheeks and said:

I had in fact no need of it, but I heard Allah's Messenger (ﷺ) as saying: It is not permissible for the women believing in Allah and the Hereafter to abstain from adornment beyond three days except (at the death of) husband (in which case she must abstain from adornment) for four months and ten days.
وَحَدَّثَنَا عَمْرٌو النَّاقِدُ، وَابْنُ أَبِي عُمَرَ، - وَاللَّفْظُ لِعَمْرٍو - حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ أَيُّوبَ بْنِ مُوسَى، عَنْ حُمَيْدِ بْنِ نَافِعٍ، عَنْ زَيْنَبَ بِنْتِ أَبِي سَلَمَةَ، قَالَتْ لَمَّا أَتَى أُمَّ حَبِيبَةَ نَعِيُّ أَبِي سُفْيَانَ دَعَتْ فِي الْيَوْمِ الثَّالِثِ بِصُفْرَةٍ فَمَسَحَتْ بِهِ ذِرَاعَيْهَا وَعَارِضَيْهَا وَقَالَتْ كُنْتُ عَنْ هَذَا غَنِيَّةً سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏ "‏ لاَ يَحِلُّ لاِمْرَأَةٍ تُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الآخِرِ أَنْ تُحِدَّ فَوْقَ ثَلاَثٍ إِلاَّ عَلَى زَوْجٍ فَإِنَّهَا تُحِدُّ عَلَيْهِ أَرْبَعَةَ أَشْهُرٍ وَعَشْرًا ‏"‏‏.‏
Reference : Sahih Muslim 1486d
In-book reference : Book 18, Hadith 79
USC-MSA web (English) reference : Book 9, Hadith 3544
  (deprecated numbering scheme)