Accepting divine will with patience
You should note that patience in acceptance of the divine will and decree is one of the attitudes of the righteous, and acceptance of Allah’s decree is one of the characteristics of those who are close to Him. The best way in which a person can respond to calamity is to say, “Al-hamdu Lillah, inna Lillahi wa inna ilayhi raji’un (Praise be to Allah, verily we belong to Allah and unto Him is our return).”
The best that we can tell you is that which was narrated from Abu Musa al-Ash’ari (may Allah be pleased with him), that the Messenger of Allah (peace and blessings of Allah be upon him) said:
“When the child of a person dies, Allah says to His angels: ‘You have taken the soul of the child of My slave?’
They say: ‘Yes.’
He says: ‘You have taken the apple of his eye?’
They say: ‘Yes.’
He says: ‘What did My slave say?’
They say: ‘He praised You and said inna Lillahi wa inna ilayhi raji’un.’
And Allah says: ‘Build for My slave a house in Paradise, and call it the house of praise.’” (Narrated by al-Tirmidhi, 1021; classed as hasan by al-Albani in Sahih al-Tirmidhi)
Al-Nawawi (may Allah have mercy on him) said:
“The death of one of one's children is a screen against the Fire, and the same applies to miscarriage, and Allah knows best.”(Al-Majmu’, 5/287; see also Hashiyat Ibn ‘Abidin, 2/228)
Mu’adh ibn Jabal narrated that the Prophet (peace and blessings of Allah be upon him) said:
“By the One in Whose Hand is my soul, the miscarried foetus will drag his mother by his umbilical cord to Paradise, if she (was patient and) sought reward (for her loss).” Narrated by Ibn Majah, 1609; classed as da’if by al-Nawawi in al-Khulasah (2/1066) and al-Busayri, but classed as sahih by al-Albani in Sahih Ibn Majah.
When to wash and shroud the child after death
The scholars unanimously agreed that if the child is known to have lived and he made a sound, then he should be washed and shrouded and the funeral prayer offered for him.
Consensus on this point was narrated by Ibn al-Mundhir, Ibn Qudamah in al-Mughni (2/328) and al-Kasani in Badai' al-Sanai’, 1/302.
Al-Nawawi said in al-Majmu’ (5/210): “He should be shrouded like an adult, with three pieces of cloth.”
But if the child did not make a sound, then in the answer to questions no. 13198 and 13985 we have explained that what matters in this case is whether the soul had been breathed into the foetus or not, which happens after four months of pregnancy.
If the soul has been breathed into him then he should be washed and shrouded, and the funeral prayer should be offered for him, but if the soul has not been breathed into him, then he should not be washed and the funeral prayer should not be offered for him. (See: al-Mughni, 2/328; al-Insaf, 2/504)
Offering `aqiqah for a miscarried foetus
With regard to offering `aqiqah for a miscarried foetus if he had reached the age of four months gestation , the scholars differed as to whether this is prescribed in Islam. In the answer to questions no. 12475 and 50106 , we stated that the scholars of the Standing Committee for Issuing Fatwas, and Shaykh Ibn ‘Uthaymin, favoured the view that it is prescribed and is mustahabb. They are also of the view that the child should be given a name.
Who should offer the `aqiqah?
The one who is commanded to do the ‘aqiqah is the one who is obliged to spend on the child, namely the father if he is present; if he refuses to do that then there is nothing wrong with someone else doing it, such as the mother.
It says in al-Mawsu’ah al-Fiqhiyyah (30/279):
“The Shafi`is are of the view that the `aqiqah is required from the one who is obliged to spend on the child, and he should pay for it from his own wealth, not the child’s wealth. No one who is not obliged to spend on the child should do it, except with permission from the one who is obliged to spend on him.
The Hanbalis stated that no one should do the `aqiqah except the father, unless he cannot do it because he is deceased or he is refusing to do it. If someone other than the father does it, that is not makruh, but it is not an `aqiqah. The only reason why the Prophet (peace and blessings of Allah be upon him) did the `aqiqah for al-Hasan and al-Husayn was because he is closer to the believers than their own selves.”
If the father is alive and can afford it, then he is advised to offer the `aqiqah on behalf of the child. If he refuses or he gives the mother permission to do the `aqiqah, then that is Islamically acceptable.
In conclusion, what your husband did, washing and shrouding her and offering the funeral prayer for her is correct and is prescribed in Islam, but you still have to give her a name and offer the `aqiqah on her behalf.
And Allah knows best.