The Holy Prophet of Islam, peace be upon him and his family, wept on the martyrdom of Hamza and Ja’far and also encouraged others to weep. The great Shia Imams, peace be upon them, have encouraged us to keep the memory of the event of Karbala alive through different ways namely, holding mourning ceremonies, weeping and making others weep, reciting elegies and visiting the grave of the Chief of the Martyrs, Imam Hussein (A.S.). It is inferred from the religious doctrines that what is really emphasized upon is to keep the memories of those nobles alive by way of holding mourning and commemoration ceremonies. When it comes to the manner and style of holding the mourning ceremonies, there is no specific guidelines in this regard; it has been relegated to the people of every city or town themselves as to how they hold those ceremonies. Definitely, insofar as the Lawgiver (God or His Prophet) has not prohibited a certain way of mourning or in case a particular way of mourning does not run counter to other principles and values of Islam and the school of Ahlul-Bayt, we can consider it as permissible.
In order to clarify the answer to your question, it is necessary to take notice of the following points:
1. First of all, it should be said that the memory of those great and elect men should be kept alive and their traits and characteristics should be the focus of attention. For this reason, we see that the Holy Prophet (S) as well as the infallible Imams, peace be upon them, adopted different ways and methods to revive the memories and names of the martyrs of Karbala, especially the Chief of the Martyrs, Imam Hussein, peace and blessings of Allah be upon him.
We know also that holding mourning ceremonies and gatherings and narrating the stories of the sacrifices and devotions of the martyrs of Karbala are a way of keeping their memories alive. Mourning for the martyrs is also a way for commemorating and expressing gratitude to the sufferings and efforts made by them. In addition, these ceremonies serve as classes for teaching and conveying the messages which they wanted to deliver to humanity.
2. Mourning for martyrs and holding mourning ceremonies:
We read in historical sources that:
a) When Hamza was killed, Safiya daughter of Abdul Muttalib went out to look for his body. The Ansar (Medinan citizen) tried to prevent her from doing so. In fact, they did not want her to see Hamza’s body. Seeing this, the Holy Prophet (S) said, “Let her do freely what she wants to do. Safiya walked to Hamza’s body and started crying. Since she was crying loudly, the Prophet (S) was also crying loudly, and when she started to cry softly, the Prophet (S) also cried softly. Fatima (S.A.), the daughter of the Holy Prophet (S) was also crying and the Prophet cried at her crying and said: “Never so great a calamity has reached me like this.” Then she said to Fatima and Safiya: “Glad news, now did Gabriel inform me that it is written on the seventh heaven that Hamza is the Lion of Allah and His Apostle."
b) Following the Battle of Uhud, the Prophet (S) returned to Medina. As he was passing by an Ansar’s house he heard them crying on the martyrdom of their relatives. Tears sprang to his eyes and he said: “But there is no one crying for Hamza.” As soon as Sa’d bin Ma’az and Usaidi bin Huzair returned to Bani Abdul Ashhal’s neighborhood, they told the tribeswomen to ‘leave their work and go and cry on the death of the Prophet’s uncle.’
c) In the eighth Hegira year, the Prophet of Islam (S) dispatched Ja’far bin Abi Talib, Zaid bin Haritha and Abdullah bin Rawahah as the head of an army to fight the Romans in Ash-Shaam (Syria). They proceeded until they were close to Al-Balqaa', a region in Syria, where they were met by the Roman and Arab troops at a village called Mashaarif. The enemies went forward and the Muslims drew back to a village called Mu'tah. The armies met there and the Muslims prepared for confrontation. Zaid ibn Haritha was the first leader from the Muslims to be martyred whilst he was fighting courageously. Therefore Ja‘far ibn Abi Talib took the standard with his right hand and chanted lines of poetry referring to Paradise and his determination to fight the Romans. His right arm was cut off so he held the standard with his left hand, which was also cut off. He therefore enfolded the standard using the upper parts of his arms until he was martyred. ‘Abdullah ibn Rawahah grabbed the standard and endeavored to dismount from his horse. He recited lines of poetry swearing that he would dismount, and he went on wondering how his soul hated to be killed while it would later enjoy Paradise, and said to himself that if he was not killed in the battlefield, he would eventually die anyway.
After their martyrdom, the Messenger of Allah said: على مثل جعفر فلتبك البواكى The lamenting women should cry on the like of Ja’far.” Asma bint Umais Khas’ami who was Ja’far’s wife said: “when I heard the news of Ja’far’s martyrdom from the Messenger of Allah, I cried out: “Alas! Ja’far has been killed! Fatima, the daughter of the Messenger of God heard me while she was also crying “Alas! My cousin.” Then the Messenger of God pulled up his cloak and while he involuntarily wept, he walked out and said: “On Ja’far should the lamenting women cry.” Then he turned to Fatima and said to her: يا فاطمة اصنعى لعيال جعفر طعاما فانهم فى شغل (O’ Fatima, make some meal for Ja’far’s family as they are busy.” Fatima prepared meal for them for three days and this became a custom among Banu Hashim (clan of Hashim).
d) Fatima (S.A.) wept for the Messenger of Allah (S):
Saeid bin Sulayman narrates from Ebad bin ‘Awam, he from Helal bin Khabbab, from Akramah, from Ibn-e Abbas that he said that when Sura Al-Nasr was revealed, the Holy Prophet (S) called Lady Fatima near and confided a secret to her which made her extremely happy. When the Holy Prophet (S) passed away, Imam Ali (A.S.) removed his hand from under the holy face of the Prophet and passed it over his face, and he closed the eyes of the Messenger of Allah (S), covered him with a cloth. Someone asked Lady Fatima: “What did the Messenger of Allah (S) tell you?” She replied: “He told me not to cry as I would be the first to join him from Ahlul Bayt (A.S.) and I will not live much longer after the passing away of the Holy Prophet (S). Due to this my grief was dispelled.”
e) The Shia Imams (A.S.) and Different Ways of Mourning for Imam Hussein (A.S.):
Holding Mourning Ceremonies:
One of the methods that the Imams used to keep the memory of the rise of Ashura alive was arranging gatherings for crying and mourning and making others cry for the tragic incidents that took place in Karbala and reminding people of those incidents on appropriate occasions.
Imam Sajjad would constantly cry and mourn for what had taken place on the day of Ashura during the years he was the Imam of the Ummah. He cried so much to the extent that he was known as and called one of the "Bakka’een" (those who cried very much).
Alqame Hadrami relates that Imam Baqir (as) would gather people in his house on the day of Ashura to cry and mourn, and the Imam himself would cry for his grandfather. There was no Taqiyyah involved and he would tell those in the house to cry for Imam Hossein and to express their condolences to each other on the day of his martyrdom.
On one occasion Imam Sadiq told Dawood Ruqi: "I have never drunk cold water without remembering Imam Hossein."
It is narrated in a hadith that Imam Reza said: "When the month of Muharram would arrive no one would see my father (Imam Kazim) smile and sadness and sorrow would take over him until the day of Ashura. The tenth day of Muharram was the day of sorrow and sadness and tragedy and he would say: Today is the day in which Imam Hossein was martyred."
Therefore, not only would the Infallible Imams attend these gatherings themselves and cry for Imam Hussein but they would always encourage people to cry and mourn for the Imam. It has been said in a hadith that: "Whoever cries for Imam Hossein or makes someone else cry for the Imam will be rewarded paradise, and even those who show they are sad and crying [even if they aren't because of whatever reason] will also be rewarded with paradise".
The eulogists and poets like Kumit Asadi, Da'bal Khaza'ei and Seyyed Humairi were praised by the Infallible Imams (A.S.) for their reciting elegies and composing poems on the tragedy of Karbala.
Therefore, it is clear that not only the Holy Prophet (S) and Imams (S) did not forbade people from weeping and mourning but there are indications and ample evidence concerning the martyrs of Islam especially the Chief of Martyrs, Imam Hussein (A.S.) that leave no doubt in our mind that mourning for the martyrs was a tradition [sunnah] of the Prophet and Imams.
3. As for whether it is necessary that lamentation and mourning ceremonies be held in the same way in all regions and at all times, it should be said that it is inferred from religious sources that what is recommended is to mourn for the infallibles and keep their memories alive. As for the manner and style of holding the mourning ceremonies, it has been relegated to the custom prevalent in every city or town. Definitely, insofar as the Lawgiver (God or His Prophet) has not prohibited a certain way of mourning or in case a particular way of mourning does not run counter to other principles and values of Islam and the school of Ahlul-Bayt, we can consider it as permissible.
For further information in this regard, you may go through the following discourse rendered by Ayatollah Mahdi Hadavi Tehrani on proper way of holding mourning ceremonies:
Without doubt, mourning for Imam Hussein (A.S.) is one of the most important rituals in Shia religion. It has been able to preserve the values of the Shia school and transfer them from one generation to another. Imam Hussein (A.S.), as stated in the narrations, is the cause of the survival of the reality of Islam. The Prophet of Islam (S) said: “Hussein is from me and I am from Hussein” which has been interpreted as Hussein being the son of the Seal of Prophets or the “grandson of Prophet Muhammad (S)”. If the Prophet (S) said “I am from Hussein”, he, in fact, meant that the school of the Ahlul-Bayt (A.S.) which constituted the reality of Islam and in which the real Islam was manifested was maintained and protected by Imam Hussein (A.S.) only. The protection of this school is guaranteed by these mourning ceremonies and by keeping the memory of Imam Hussein (A.S.) alive. However, keeping in view the importance of these religious programs which provide an opportunity for us to acquaint ourselves with Imam Hussein’s schools and the reality of the religion in general and the imamate in particular, we must note that the cultural aspects of these ceremonies should be as such that they must be consistent and congruous with the values and ideals of Imam Hussein (A.S.). They should not be opposed to the Islamic criteria and standards. One of the most important issues that has to be taken into consideration is keeping away from prohibitions or sins. Imam Hussein, peace be upon him, was martyred in the way of amr bil ma’ruf wa nahy anil munkar (bidding the good and forbidding from vice). That is to say, Imam Hussein (A.S.) sacrificed his life in the way of spreading virtues and forbidding people from what the religion of the Prophet forbade them. Therefore, the commemoration ceremonies and mourning for Imam Hussein (A.S.) should be held in a way such that those gatherings themselves should be the manifestation of bidding the good and forbidding from the bad. That is to say, those who enter these gatherings should be prompted to do the good, acquire virtues and do what God has commanded them to do. In other words, they should be made to stay away from vice and evil. God forbid, if in these gatherings someone commits an offense or a sin or, let’s say, good act (ma’ruf) is neglected, for instance an obligatory prayer is missed and instead recommended acts are done, this definitely goes against the ideals and goals of Imam Hussein (A.S.).
All those who take part in these gathering are responsible irrespective of whether they are participants or holders of the ceremony or whether they are the audience of the speakers. All are responsible to preserve Imam Hussein’s ideals. Everyone should play a role in this regard proportionate to the position and status he enjoys in society. The speakers and lecturers who present religious knowledge to people in such gatherings must make sure that the knowledge they present should improve people’s knowledge and awareness about the religious truths so that their faith and belief may be strengthened. In Islam, belief in religious truths is based on rational values and standards. Islam is the religion of reason, wisdom, knowledge, understanding and insight, not the religion of ignorance, superstition and myth. Therefore, the speaker, who sits on the pulpit and speaks to people, should provide people with such information about Islam that is correct and precise. God forbid, if he provides them with incorrect and false information, this by itself is a kind of spreading evil which is against Imam Hussein’s ideals and goals.
If these gatherings are held in a way such that they spread superstition and false ideas, and serve to weaken people’s beliefs and make our thoughtful and wise generation heedless to such gatherings, that is definitely opposed to Imam Hussein’s ideals and also to Islamic values. The ceremonies held to commemorate the martyrdom of Imam Hussein (A.S.) should be, apart from the enthusiasm and love for Imam Hussein (A.S), gatherings for understanding the realities of the religion and religious teachings. If an eulogist or a narrator narrates the story of Imam Hussein (A.S.), he must make sure that what he narrates is authentic, historically documented and appropriate of the position of Imam Hussein (A.S.). He must use the best and the most beautiful language e.g. poem to describe the historical realities and the calamities which Imam Hussein (A.S.), his family, children and devout friends suffered. One should not relate stories that are not authenticated nor should he tell anything that is incompatible with Islamic concepts in the name of the teachings of Imam Hussein (A.S.) or in the name of his love. The love which is valuable in Islam is the love which is based on wisdom and reason. That is the red love which in fact enlightens the human intelligence. It is the love which should in reality manifest the reality of the religion and represent the public faith and belief. We must not preach anything which is opposed to the religion, history and reason. We should not spread false ideas in society in the name of love for Imam Hussein or in the name of belief in Imam Hussein (A.S.).
 - Waqedi, Muhammad bin Umar, Maghazi, The History of the Battles of the Prophet (s), translation, Damghani, Muhmood Mahdavi, pg. 209, Tehran University Press, 2nd edition, 1369 (1990).
 - Tabari, Muhammad bin Jarir, Tarikh Al-Tabari, translation, Payanda, Abul Qasim, vo.3, pg. 1039 and 1040, 5th edition, 1375 (1996).
 - Ya’qubi, Ahmad bin Abi Ya’qub Ibn Wazih, Tarikh Al-Ya’qubi, translation, Ayati, Muhammad Ibrahim, vol. 1, pg. 427 and 428, Scientific and Cultural Publication, 6th edition, 1371 (1992).
 - Waqedi, Muhammad bin Sa’d Katib, translation, Mahdavi Damghani, Mahmood, Al-Tabaqat al-Kubra, translation, vol.2, pg. 188, Tehran, Culture and Thought Publication, 1374 (1995); ‘Izzuddin Ali bin Athir, translation, Halat, Abu Al-Qasim and Khalili, Abbas, Tehran, Scientific Publications Institute, 1371 (1992).
 - Wasa’elul-Shia, vol. 2, pg. 922.
 - Wasa’elul-Shia, vol. 2, pg. 398.
 - Amali (Saduq), pg. 142.
 - Mafatihul-Jinan, Sheikh Abbas Qummi, the section on the rituals and supplications of Muharram.
 - Biharul-Anwar, vol. 24, pg. 284.
 - Extracted from index: 2302 (site: 2518).
 - Vide: Muhaddith Noori, Mustadrak al-Wasail, vol.2, pg. 458, Aalulbayt (a.s.) Institute, Qom, 1408 A.H.
 - Related index: The Islamic Law about Qamazani (Tatbir) in the Present Time, question 728 (site: 772).