The implication of Verse 118 was that those who persisted in their denial of the Holy Prophet ﷺ did so out of sheer malice and ignorance, and could not be expected to reform themselves. Since he has been sent as the mercy for all the worlds", the thought of their being incorrigible was likely to make him sad on their account. So, in this verse Allah offers him a consolation. He has been sent down to men, bearing the truth and the genuine faith. His function is twofold -- to give glad tidings to those who accept the truth, and warnings of dire punishment to those who deny. Allah assures him that he will not be held responsible or taken to account for those who willingly pursue the way to Hell. All that he is required to do is to keep performing his own function, and not to worry as to who accepts the truth and who does not.
Allah's statement;
(And you will not be asked about the dwellers of the blazing Fire.) means, "We shall not ask you about the disbelief of those who rejected you." Similarly, Allah said,
(Your duty is only to convey (the Message) and on Us is the reckoning.) (13:40)
(So remind them (O Muhammad ) ـ you are only one who reminds. You are not a dictator over them.)(88:21-22) and,
(We know best what they say. And you (O Muhammad ) are not the one to force them (to belief). But warn by the Qur'an; him who fears My threat) (50:45).
There are many other similar Ayat.
Imam Ahmad recorded `Ata' bin Yasar saying that he met `Abdullah bin `Amr bin Al-`As and said to him, "Tell me about the description of the Messenger of Allah in the Torah." He said, "Yes, by Allah, he is described by the Torah with the same characteristics that he is described with in the Qur'an with: `O Prophet! We have sent you as a witness, a bringer of good news, a warner, and as safe refuge for the unlettered people. You are My servant and Messenger. I have called you the Mutawakkil (who depends and relies on Allah for each and everything). You are not harsh, nor hard, nor obnoxious in the bazaars. He does not reward the evil deed with an evil deed. Rather, he forgives and pardons. Allah will not bring his life to an end, until he straightens the wicked's religion by his hands so that the people proclaim: There is no deity worthy of worship except Allah. By his hands, Allah will open blind eyes, deaf ears and sealed hearts."' This was recorded by Al-Bukhari only.