From Sahih Muslim (Hadith 3739):
A'isha (Allah be pleased with her) reported Allah's Messenger (ﷺ) as saying:It is not permissible for a woman believing in Allah and the Hereafter to observe mourning on the dead for more than three (days), except in case of her husband
Reference: Muslim 3739