This verse gives condolences and consolation to the prophet: that if you see people who vie with one another in unbelief and blasphemy, grieve not at all; because they can never harm Allah for aught.
Fact is that; benefit and loss is for those BEINGS, whose existence belongs not to themselves. As for Allah whose Essence is Eternal, and whose existence has not any beginning and is Everlasting; He is of surety Self - sufficient in all aspects. Therefore people's belief or unbelief has no effect on Him.
If you see people choosing the way of heathenism by their own free will, let them have that rope to hang themselves, now that they insist. God Has created them free and wants them free - If they prefer evil, they can never do any harm to Allah - They will waste their own share in the Hereafter and reduce it to nothing, and to a dreadful great punishment that may await them!