Out of its appreciation of the sacredness of marital life and the special relation between the spouses, Islam demands a woman to mourn her deceased husband by abandoning ornaments, make-up, perfumes, etc. for the period of waiting dictated by Shari`ah.
Moreover, a woman can attend the funeral of her husband provided that she abides by the rulings of Islam in this respect. What is prohibited is doing something haram while accompanying the funeral procession, according to the hadiths: “He who (on befalling a calamity) slaps his cheeks, tears his clothes and follows the ways and traditions of the Jahiliyyah (pre-Islamic period) is none of us.”
In his answer to the question you raised, the eminent Muslim scholar, Sheikh Muhammad `Ali Al-Hanooti, member of the North American Fiqh Council, states:
“After her husband’s death, a widow should start her ihdad (mourning) and `iddah (waiting period) for four months and ten days or for giving birth to the child if she is pregnant.
During her `iddah, a widow is not supposed to go anywhere unless there is a need, like shopping, medication, etc. But, she won’t go out as was usual before her husband’s death. She won’t wear any beautification or cosmetics because that is a signal that she is ready for marriage, whereas no one is allowed to reach her for marriage openly until the `iddah is over. She can attend the funeral.”