All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
A wife is not obliged to inform her husband before marriage if her menses is irregular, as this is not among the deficiencies which a person is obliged to inform about before marriage. Rather, even being barren is not among the deficiencies for which either spouse has the option to stay married or to divorce. So, neither the husband nor the wife is obliged to inform about him/her being sterile before the marriage contract but this is desirable. For more benefit on the deficiencies that affect marriage, please refer to Fatwa 90593.
Therefore, your husband should not have hastened to divorce as the medical treatment could be possible. Mistreating you and spreading the news that you are barren is contradictory to having good marital relations with one’s wife which the Sharee’ah advised the husband to have.
In any case, since what happened had happened, you should put the matter in the hands of Allaah, and it might be that there is goodness in separation and Allaah may grant you a better husband than your husband. Allaah Says (what means): {But if they separate [by divorce], Allaah will enrich each [of them] from His abundance. And ever is Allaah Encompassing and Wise.}[Quran 4:130]
Nonetheless, your husband has to give you all your rights and we have already issued Fatwa 86603 clarifying the rights of a divorcee. Among these rights is the dowry which you are fully entitled to after the consummation of the marriage whether or not he divorces you.
In case he does not give you your dowry, then you should take the matter to an Islamic court.
Allaah Knows best.