Ruling on not having children for fear that they may suffer hereditary diseases
Question

I have been suffering mental illness for years, and I am afraid that my children would be affected by the same illness. Is it permissible for me to get sterilized, or to agree with anyone who proposes to me that we will not have children?
Praise be to Allah.It is not permissible for you to get sterilized, even with the agreement of your husband. The cases in which it is permissible to limit the number of children, or stop having children, or prevent having children are very few, because the principle is that Muslims should have many children. These cases do not include the fear of children having disabilities; rather that is only permissible in cases where pregnancy would cause considerable harm to the mother. The fiqh councils and academic committees, and the majority of scholars have issued fatwas stating that it is haram to limit the number of children or to prevent having children except in cases of necessity, as determined by trustworthy doctors.
The scholars of the Permanent Committee for Ifta’ stated:
It is not permissible to prevent having children for fear of disability [meaning that the child would have a disability]. Rather it is obligatory to put one’s trust in Allah, may He be glorified, and think positively of Him. End quote.
Shaykh ‘Abd al-‘Azeez ibn Baaz, Shaykh ‘Abd al-‘Azeez Aal ash-Shaykh, Shaykh ‘Abdullah ibn Ghadyaan, Shaykh Saalih al-Fawzaan, Shaykh Bakr Abu Zayd.
Fatawa al-Lajnah ad-Daa’imah (18/14).
It says in a statement of the majlis of the Islamic Fiqh Council:
After studying the research presented by members and experts on the topic of birth control, and listening to the discussion that took place on that topic,
And based on the fact that one of the objectives of marriage according to Islamic teachings is to have children and perpetuate the human race, and that it is not permissible to undermine this objective, because undermining it is contrary to the religious texts and the teachings which promote having many children, protecting them and taking care of them, because perpetuating humankind is one of the five holistic principles which Islam came to promote,
The council determined the following:
1. It is not permissible to issue general laws limiting the freedom of spouses to have children.
2. It is haram to eliminate the ability to produce children in both men and women – meaning what is known as sterilization – unless there are some circumstances that make it necessary, according to Islamic guidelines.
3. It is permissible to take measures temporarily, with the aim of spacing pregnancies, or to avoid having children for a specific period, if there is a valid reason according to Islamic teachings, which is to be worked out by the spouses, with consultation between them and the consent of both, on condition that that does not lead to harm, that the means used is permissible, and that it will not impact an existing pregnancy. End quote.
And Allah knows best.
In al-Mawsoo‘ah al-Fiqhiyyah (30/268) it says:
It is haram for a man to take medicine to eliminate his desire completely, just as it is haram for a woman to take measures to prevent pregnancy. End quote.