Overall Meaning: Meaning of gloating:
Shamatah linguistically: It is rejoicing at the enemy’s affliction. [1002] al-Sihah, al-Jawhari (1/366).
Shamatah technically: It is being pleased by the calamity of the one who opposes you and you oppose him. [1003] al-Mufradat, al-Raghib (1/552). It is also described as the glee of the self, brought about by what harms afflict other than it. It manifests due to enmity and envy. [1004] al-Tahrir wa al-Tanwir, Ibn `Ashur (8/299).

Dispraise of gloating and its prohibition in the Qur’an and Sunnah:
❖ Allah, exalted, says, “He Harun said, ‘Son of my mother, these people overpowered me! They almost killed me! Do not give my enemies reason to rejoice! Do not include me with these evildoers!’” (al-A`raf: 150)
❖ Allah, exalted, says, “They grieve at any good that befalls you and rejoice at your misfortunes.” (Al `Imran: 120) This rejoicing is gloating. Envy and gloating go hand in hand. [1005] Tafsir al-Razi (3/215).
❖ Abu Hurayrah, Allah be pleased with him, said that the Prophet ﷺ used to seek refuge from bad decree, being overtaken by destruction, the gloating of enemies, and the difficult moment of a calamity. `Amr said in his narration, “Sufyan said, ‘I am doubtful that I may have increased one of them myself.’” [1006] Reported by al-Bukhari (6347) and Muslim (2707) and the wording is his.

Quotes of the Predecessors and scholars on dispraising gloating:
❖ `Umar ibn `Abd al-`Aziz said, “I never saw an oppressor so akin to also being oppressed than the envious - he is constantly anguished and always depressed.” It is also said, “If the envious sees a blessing, he spites; if he sees an affliction, he gloats.” [1007] Bariqah Mahmudiyyah, Abu Sa`id al-Khadimi (3/365).
❖ Ibn Sirin said, “I scoffed at a man for his bankruptcy, so I became bankrupt.” Ibn al-Jawzi said, “This is found plentifully. There is no ailment nor sorrow nor constriction which befell me but that I know its sinful cause. So much so that I am able to say, ‘This is due to such and such.’ It may be the case that I make some far-fetched interpretation and therefore witness the punishment for it.” [1008] al-Adab al-Shar`iyyah, Ibn Muflih (1/341).

Impacts and harms of gloating:
1- Gloating through mocking another’s sin is greater than actually committing it. [1009] Madarij al-Salikin, Ibn al-Qayyim (1/177).
2- The one who gloats may have the calamity come back on him. [1010] Bariqah Mahmudiyyah, al-Khadimi (3/378).
3- Gloating instills malice, envy, and animosity within society. It has a negative impact on the individual and society.
4- It leads to hostility and hatred.

Reasons for falling into gloating:
1- Distancing oneself from the methodology of the Messenger of Allah ﷺ.
2- Weak faith. 
3- Love of gleeful maliciousness. 
4- Being pleased at others’ misfortunes. 
5- Forgetting the next life. 
6- Love of this worldly life and clinging to it. 
7- Having such enmity that it leads to making lawful what Allah, sanctified, has made unlawful. [1011] Tuhfat al-Dhakirin, al-Shawkani (p. 443).
8- Malice and hatred for one another. [1012] See: Akhlaq al-Munafiqin, Ya`qub al-Maliji (p. 76).

Means to desisting from gloating:
1- Seeking proximity to Allah, honoured and majestic, through obedience and doing good. 
2- Following the methodology of the Noble Messenger ﷺ. 
3- Feeling sorrow for people’s troubles. 
4- Remembering the next life, and having certitude that the worldly life is perishing. 
5- Loving good for others. 
6- Detachment from the worldly life.

Hypocrites’ gloating with the Prophet ﷺ and his Companions:
❖ After the battle of Uhud, the Jews and the hypocrites gloated at the Prophet ﷺ and his Companions. When he ﷺ reached Madinah thereafter, the hypocrites and the Jews showed gloating and malicious glee. They started saying the ugliest of statements. Among those were: “Muhammad is but a seeker of kingship… a prophet has never been afflicted with the like of this… he is afflicted in his own body as well as by the loss of his companions!” They also said, “Those who were killed among you, if they stayed with us, they would not have been slaughtered.” `Umar sought permission from the Prophet ﷺ to kill those hypocrites. He replied, “Do they not show the testimony of there being no god but Allah and that I am His Messenger?” He said, “Yes, but only to be safe from the sword. Their affair is clear now, and Allah has manifested their grudges.” He ﷺ said, “I have been forbidden from those who show this.” Ibn Ubayy ibn Salul, Allah curse him, rebuked his son `Abdullah, Allah be pleased with him, as he was wounded severely. He replied to him saying, “That which Allah has afflicted His Messenger and the Muslims with is good.” [1013] al-Sirah al-Halabiyyah, `Ali ibn Ibrahim al-Halabi (2/549).

Sayings, proverbs, and poetry about gloating:
❖ “Gloating is an ignobility.” [1014] al-Mustaqsa fi Amthal al-`Arab, al-Zamakhshari (1/327).
❖ “You cooked this up, so taste it up.” This is said in gloating at the one whose misfortune came at his own hands. [1015] The previous source.
❖ Aktham ibn Sayfi said, “It is not noble for one to gloat at another if he slips up or is afflicted with some matter.” [1016] al-Amthal, Ibn Salam (1/29).
❖ Nahshal ibn Harri said,
“Whoever awaits ill of the people, they will
See him on a shameful day of misfortune.
Say then to who ignorantly gloats at me,
‘You will someday drink from the same cup.’”