What is the ruling on a woman going to the mosque to offer the funeral prayer?
Question

I work in the education field, and sometimes we hear that someone has died; they may be colleagues in the same school board in which I work, or relatives of colleagues. We know when and where the funeral prayer will be offered for them, so I go to the mosque specifically to offer the prayer for them, and I encourage my colleagues to do likewise, whether the deceased was a man or a woman or a relative of our colleagues. I think that this is their right over us. Is there anything wrong with that? Because one of my colleagues asked me to find out, and if what I am doing is good, they will follow my example, and if what I am doing is an innovation (bid‘ah) I will stop doing it.
Praise be to Allah.It is permissible for women to go to the mosque to offer the funeral prayer, because there is no religious text which forbids doing that.
Shaykh Ibn Baaz (may Allah have mercy on him) said: Offering the funeral prayer is prescribed for both men and women, because the Prophet (blessings and peace of Allah be upon him) said: “Whoever attends the funeral until the prayer has been offered [for the deceased] will have one qiraat [of reward], and whoever attends until the deceased is buried will have two qiraats.” It was said: O Messenger of Allah, what are the two qiraats? He said: “Like two great mountains,” referring to reward. Its soundness is agreed upon. But women should not follow the funeral procession to the graveyard, for they are not allowed to do that, because of the report in as-Saheehayn from Umm ‘Atiyyah (may Allah be pleased with her) who said: We were forbidden to follow the bier but not emphatically.” With regard to offering the funeral prayer for the deceased, women were not forbidden to do that, whether the prayer is offered in the mosque or at home or in the prayer place. The women used to attend the funeral prayers in the mosque with the Prophet (blessings and peace of Allah be upon him) and after his time.
As for visiting graves, that is only for men, as is also the case with following the bier to the graveyard, because the Messenger (blessings and peace of Allah be upon him) cursed women who visit graves."(Majmoo‘ Fataawa Ibn Baaz 13/134).
He (may Allah have mercy on him) also said: With regard to this hadith that the questioner mentioned – “Women have no share of the funeral” – we do not know of any basis for it, and we do not know any of the scholars who narrated it. Rather what was narrated from the Prophet (blessings and peace of Allah be upon him) regarding this matter is that he cursed the women who visit graves and those who build places of worship and install lamps over them, and he forbade women to follow the bier – i.e., to the graveyard. As for offering the funeral prayer with the people in the mosque or the prayer place, it is something that is prescribed for everyone. The women used to offer the obligatory prayer and funeral prayer with the Prophet (blessings and peace of Allah be upon him). ‘Aa’ishah (may Allah be pleased with her) attended the funeral prayer for Sa‘d ibn Abi Waqqaas (may Allah be pleased with him) in the mosque of the Prophet (blessings and peace of Allah be upon him)."(Majmoo‘ Fataawa Ibn Baaz  13/135-136).
Based on that, there is nothing wrong with you going out to offer the funeral prayer in the mosque, when you are able to do so and that does not involve any other reprehensible actions such as panicking or wailing, or causing any fitnah.
And Allah knows best.