ولقد كذبت رسل من قبلك فصبروا على ما كذبوا وأوذوا حتى أتاهم نصرنا
Verily, (many) Messengers were denied before you, but with patience they bore the denial, and they were hurt, till Our help reached them,
This comforts the Prophet's concern for those who denied and rejected him.
Allah also commands the Prophet to be patient, just as the mighty Messengers before him were. He also promised him victory, just as the previous Messengers were victorious and the good end was theirs, after the denial and harm their people placed on them. Then, victory came to them in this life, just as victory is theirs in the Hereafter.
Allah said,
وﻻ مبدل لكلمات الله
and none can alter the Words of Allah.
This refers to His decision that victory in this life and the Hereafter is for His believing servants.
Allah said in other Ayat,
ولقد سبقت كلمتنا لعبادنا المرسلين
إنهم لهم المنصورون
وإن جندنا لهم الغلبون
And, verily, Our Word has gone forth of old for Our servants, the Messengers. That they verily would be made triumphant. And that Our hosts, they verily would be the victors. (37:171-173)
and,
كتب الله ﻻغلبن أنا ورسلى إن الله قوى عزيز
Allah has decreed: "Verily! It is I and My Messengers who shall be the victorious.'' Verily, Allah is All-Powerful, Almighty. (58:21)
Allah said;
ولقد جاءك من نبٳ المرسلين
Surely, there has reached you the information about the Messengers (before you).
who were given victory and prevailed over the people who rejected them. And you (O Muhammad), have a good example in them.
Allah said next,