Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear sister in Islam, thanks a lot for your question, which reflects your care to have a clear view of the teachings of Islam. Allah commands Muslims to refer to people of knowledge to become well acquainted with the teachings of Islam in all aspects of life.
First of all, we would like to make it clear that a Muslim faces two kinds of trials, namely good and suffering. Some people are unaware of this well-established fact, and therefore they restrict the term “trials” to sufferings only. This misconception is rectified in more than one place in the Qur’an. For example, Allah says: “… and We try you with evil and with good, for ordeal. And unto Us you will be returned.” (Al-Anbiyya’ 21:35)
Also, the Messenger of Allah (peace and blessings be upon him) said: “How wonderful is the affair of the believer, for all of it is good, and that applies to no one except the believer. If something good happens to him he gives thanks, and that is good for him, and if something bad befalls him he bears it with patience, and that is good for him.” (Muslim)
Accordingly, it is the duty of the Muslim to show gratitude to Allah in times of good and patience in times of calamities. By doing so, he will be a true Muslim.
Focusing more on your question, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
As human beings, our purpose in life is to worship Allah Almighty, Who says: “I have created the species of jinn and mankind solely to worship Me.” (Adh-Dhriyat 51:56) So, our life should be based on this concept.
As for the question how we shall worship Allah, the answer is that we must do so by responding to the Divine Revelation, the last of which are the revelations contained in the Qur’an.
So long as you have tried your best to abide by the Commandments of Allah as enshrined in the Qur’an and the authentic Sunnah (tradition) of Prophet Muhammad (peace and blessings be upon him) you have done your part.
As servants of Allah, Allah sends to us many trials in order to test us and help us grow spiritually. These trials may sometimes come in the form of occasions of joy and sometimes as occasions of sorrow.
In case of joyous occasions, we must show gratitude or shukr, and in case of occasions of sorrow or misfortune, we must exercise patience. As one scholar rightly said, “A believer, male or female, is like a bird that flies to Allah with two wings, one is gratitude and the other is patience.”
As a perfect role model for this attitude, you should look to the Messenger of Allah who had been tested with different tests throughout his life. So, keep his role model and meditate upon it in order to maintain balance in your spiritual life.”
Allah the Almighty knows best.