Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
This is the eighth verse of Surah 39[Az Zumar]. Al Shawkani says in his interpretation: "hurt" means illness, poverty, fear…etc. If this befalls somebody ,"he cries to His Lord" by turning to Him, seeking His help to remove what befell him forgetting, at this very time, every thing from which he had sought help before( be that thing alive or dead). Now, when Allah bestows His favour upon that person, he forgets the hurt, he asked Allah to remove from him. It might also mean that he forgets the One (Allah) he supplicated to and even goes beyond that by committing Shirk. Allah further says:" And he sets up rivals to Allah …" i.e. idols and the like which he supplicates and worships. "… To mislead others from His path." i.e. to lead people astray from the way of Allah which is Islam and monotheism.
Al Suddy says: "rivals" means persons on whom he relies in all his matters." After that Allah ordered His messenger to warn people who do that. Allah says:" say:" Take pleasure in your disbelief for a while," i.e. a short while or a short period of time as the pleasure of this Dunya (world) is very small indeed. Then Allah justifies this by saying:" you are of the dwellers of the fire" meaning such a person's destination is Hell after a very short period of time. This is an emphasized warning. Al Zojaj said:" The verb is in the imperative form and its meaning is a severe warning and threat."
Allah knows best.