كتاب الطلاق
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 938 e

Umm 'Atiyya ('Allah be pleased with her) said:

We were forbidden to observe mourning for the dead beyond three days except in the case of husband (where it is permissible) for four months and ten days, and (that during this period) we should neither use collyrium nor touch perfume, nor wear dyed clothes, but concession was given to a woman when one of us was purified of our courses to make use of a little incense or scent.
وَحَدَّثَنِي أَبُو الرَّبِيعِ الزَّهْرَانِيُّ، حَدَّثَنَا حَمَّادٌ، حَدَّثَنَا أَيُّوبُ، عَنْ حَفْصَةَ، عَنْ أُمِّ عَطِيَّةَ، قَالَتْ كُنَّا نُنْهَى أَنْ نُحِدَّ عَلَى مَيِّتٍ فَوْقَ ثَلاَثٍ إِلاَّ عَلَى زَوْجٍ أَرْبَعَةَ أَشْهُرٍ وَعَشْرًا وَلاَ نَكْتَحِلُ وَلاَ نَتَطَيَّبُ وَلاَ نَلْبَسُ ثَوْبًا مَصْبُوغًا وَقَدْ رُخِّصَ لِلْمَرْأَةِ فِي طُهْرِهَا إِذَا اغْتَسَلَتْ إِحْدَانَا مِنْ مَحِيضِهَا فِي نُبْذَةٍ مِنْ قُسْطٍ وَأَظْفَارٍ ‏.‏
Reference : Sahih Muslim 938e
In-book reference : Book 18, Hadith 87
USC-MSA web (English) reference : Book 9, Hadith 3552
  (deprecated numbering scheme)