بسم الله الرحمن الرحيم
Excerpt From: Ibn al Qayyim al Jawziyyah (R)’s Zad al Ma’ad, abridged version; summarized by Ibn Abdul Wahhab at-Timimi, pp. 253-255:
Nothing is said to you, [O Muhammad], except what was already said to the messengers before you. Indeed, your Lord is a possessor of forgiveness and a possessor of painful penalty.
[Surat Fussilat, 41:43]
And He the Most High says:
And thus We have made for every prophet an enemy – devils from mankind and jinn…
[Surat’l An’aam, 6: part of # 112]
And He the Most High says:
Similarly, there came not to those before them any messenger except that they said, “A magician or a madman.”
Did they suggest it to them? Rather, they [themselves] are a transgressing people.
[Surat ash-Dhaariyaat, 51:52-53]
So Allah, Most Glorified strengthened His Prophet thereby and informed him that he has an example in those (Prophets) who came before him. And He strengthened his followers with His Words:
Or do you think that you will enter Paradise while such [trial] has not yet come to you as came to those who passed on before you?
[Surat’l Baqarah, part of ayah # 214]
And His Words:
Alif, Lam, Meem. Do the people think that they will be left to say, “We believe” and they will not be tried?
[Surat’l Ankaboot, 29:1-2]
Upto His Words:
[Surat’l Ankaboot, 29: part of ayah # 10]
Let the slave observe the context of these Verses and the admonition and treasures of wisdom they contain, for when Messengers are sent to the people, they respond in one of two ways: Either one of them will say: “We have believed,” or he will not, and continue to commit sins. And whoever says: “We have believed” is tested by his Lord and testing means trying him by affliction and giving him choices in order to make clear the truthful person from the liar. And whoever did not say: “We have believed” should not imagine that he will evade Allah or outstrip Him; and whoever believed in the Messengers, their enemies will become enemies to him and will seek to harm him, so he will be put to trial by what causes him pain. But as for those who do not obey them (i.e. the Messengers), they will be punished in the life of this world and in the Hereafter.
Every person must experience pain, but the believer experiences pain at the beginning, but then the final outcome is in his favour. The rejecter, on the other hand experiences pleasure at the beginning, but later he will experience unending pain.
Ash-Shafi’i – may Allah have mercy on him – was asked,“What is better for a man, to be established (in the earth) or to be tried by affliction?” He replied: “He will not be established until he has been tried by affliction. Allah, the Almighty, the All-Powerful tried Ulul-‘Azm  from among the Messengers; and when they were patient, He established them (in the earth).”
So no one should imagine that he will completely escape pain. And the most intelligent of them are those who endured unending pain in return for pain which will cease, while the most foolish of them are those who endured pain which will cease in return for severe, unending pain.
 Ulul-‘Azm: The Possessors of Firm Will: Noah, Abraham, Moses, Jesus, and Muhammad salalahu ‘alayhi wasalam. See Surat’l Ahqaf, 46:35.