You can view the tests life throws at you as a disaster, or an opportunity.
Childlessness is a difficult test, for sure, but perhaps it is a gift for you from the Lord of the universe, who commands you to care for orphans and the needy. Perhaps, because you could not have children of your own, you will care for another’s, your daily striving forever at the service of others.
Worship none but God; be good to your parents and kinsfolk, to orphans and the poor; speak good words to all people; keep up the prayer and pay the prescribed alms.from Quran 2:83
Perhaps, in earlier times, you found yourself in conflict with others. Then let it be an opportunity to now make peace. Perhaps you once had a broken heart, so let it be an opportunity to mend a heart, sowing the seeds of forgiveness and mercy.
In the moment of sorrow, anguish and despair, shed your tears: it’s your right to. But when your tears have dried, pick yourself up again and seek out the gifts of the One in whose hand is your soul.
And We will surely test you with something of fear and hunger and a loss of wealth and lives and fruits, but give good tidings to the patient. Those who, when afflicted with a calamity, say: “We belong to God and to Him we shall return!”Quran 2:155-6