MOURNING or HIDAAD
According to dictionary Mourning means the act of sorrowing or a period of time during which signs of grief are shown . The Islamic term for mourning is Hidaad.
“And those of you who die and leave wives behind them, they (the wives) shall wait for four months & ten days, then when they have fulfilled their term, there is no sin on you if they dispose of themselves in a just and honourable manner. And Allah is Well-Acquainted with what you do.” Surah Al-Baqarah 2:234
“And those of your women as have passed the age of monthly courses, for them the ‘Iddah’, if you have doubt (about their periods) is three months; and for those who have no courses, their ‘Iddah’ is three months likewise, except in case of death. And for those who are pregnant (divorced or widowed), their ‘Iddah’ is until they lay down their burden; and whosoever fears Allah and keeps his duty to Him, He will make his matter easy for him.” Surah At-Talaq 65:4
Raising one’s voice in wailing (Crying in load voice) and lamenting, striking the cheeks and eulogizing the deceased are all bid’ah and actions of the jaahiliyyah. It was reported in a hadeeth: “He is not one of us who strikes his cheeks, rends his garments and calls with the call of the jaahiliyyah(period of ignorance).” Sahih al-Bukhari, 1294(Vol.2 : 385), Fath 3/163; Sahih Muslim, 103; Musnad Ahmad, 1/244
Narrated Umm Atiyya(R): “We were forbidden to mourn for more than three days for a dead person except for a husband, for whom a wife should mourn for four months and ten days. (While in mourning period) we were not allowed to put kohl in our eyes, nor perfume ourselves, nor wear dyed clothes, except a garment of ‘Asb’. But it was permissible for us that when one of us became clean from her menses and took a bath, she could use a piece of certain kind of incense. And it was forbidden for us to follow funeral processions.” Book of Divorce, Sahih Bukhari, Vol. 7: 5341
Tears from the eyes of Prophet ﷺ
Narrated Usama bin Zaid(R):A grandson (child of the daughter) of the Messenger of Allah (ﷺ) was presented to him while the child was at his last breath. Tears began to flow from the eyes of the Messenger of Allah (ﷺ). Sa'd said to him: "What is this, O Messenger of Allah?" He (ﷺ) said, "It is mercy which Allah has placed in the hearts of his salves. Allah bestows His Mercy on the merciful among His slaves." Sahih al-Bukhari 1284 (Vol. 2:373)
Abu Hurayrah narrated that the Prophetﷺsaid,"There are two practices found among people, both of which indicate disbelief (Kufr): ridiculing the ancestry (of others) and wailing over the dead." Sahih Muslim, vol.1:128
Weeping for the dead is permissible in Islam, whereas wailing, matam (physically beating oneself) and crying in a high pitch voice is absolutely prohibited in Islam. 
A woman may mourn the death of a loved one for three days. This period is considered long enough for a person to immerse himself in grief and sadness. Islam emphasizes that death is not the termination of a person rather it is the beginning of a journey, from a transient stop to life everlasting. The only exception to this duration is at the death of a woman’s husband. Muslim scholars agree that weeping for the dead is permissible, whereas crying out loud and wailing are not. The Prophet (S) said: "The one who is wailed for is tortured on account of it." Sahih Al Bukhari, vol.2:379; Sahih Muslim, vol.2:2015
A wife must observe a mourning period, known in Islam as iddah, of four months and ten days for her deceased husband. This period is considered an extension of her marriage and she is not allowed to receive any new proposals of marriage during this time. This period is prescribed for widows in order that they mourn the death of their husbands, fulfill any required obligations and to see if the widow is pregnant. If pregnancy is confirmed then the mourning period is extended until delivery, as mentioned in Quran suarh Talaq 65:4 
As regards the mourning period in Islam, a woman should mourn her husband for four months and ten days, and she should mourn her relatives other than her husband for three days if she wants to, but this is not an obligation on her. As you mentioned, there must be a wisdom behind this specification, and indeed there is. This is because the Islamic Law was revealed by Allaah who created the entire creation and He knows what is beneficial for them; He is The All-Wise, The All-Knower. It is for this reason that we, Muslims, believe in this wisdom whether or not we know it.
The Muslim scholars stated that among the wisdom of specifying the mourning period of a woman over her husband to four months and ten days, is in order to make sure that she is not pregnant. Medical doctors stated that in general the foetus takes a full human form after the period of 120 days, so this period is taken as the waiting period [which a woman is obliged to observe before she remarries], and a period of ten days is added to that period just for being on the safe side. This is because the lunar month –which is the Islamic calendar –sometimes comes as 29 days while sometimes it completes 30 days, so the ten days are for making up for the probability of any lack in the calculation.
As regards specifying the woman’s mourning period on her relatives other than her husband to three days only, this is because mourning a dead is glorifying the disaster of death. This disaster must happen to a person who loses a loved one, as being saddened for their loss is part of human nature.
The permissibility of mourning for three days is a recognition to this human nature so that after this, a woman feels a kind of comfort after having expressed her feelings of sadness and sorrow.
The reason of specifying the mourning period to three days only is because this period is usually enough, and there is a preponderant expected harm in the mourning which lasts more than three days. On the contrary, there is not much harm in mourning for three days only. This indeed shows the excellence of this Islamic Law. 
Shaikh ibn Baz(May Allah have mercy on him) says:
These are the five items that a woman must attend to when her husband dies. 
Wearing black as a sign of mourning for the deceased is bid’ah; but the wives of the deceased should avoid wearing fancy or adorned clothes, jewellery, makeup and perfume during their period of mourning.
It is bid’ah for women to avoid their usual work and activities; the newly-widowed woman can still prepare food, clean the house, wash the dishes, do laundry, etc. There is nothing wrong with her doing that.