وَيَوْمَ يَعَضُّ ٱلظَّالِمُ عَلَىٰ يَدَيْهِ يَقُولُ يَٰلَيْتَنِى ٱتَّخَذْتُ مَعَ ٱلرَّسُولِ سَبِيلًا · يَٰوَيْلَتَىٰ لَيْتَنِى لَمْ أَتَّخِذْ فُلَانًا خَلِيلًا
"On that day the wrongdoer will bite his hands and say: 'Would that I had taken a way together with the Messenger! Woe to me! Would that I had not taken so-and-so as a friend!'"
يَعَضُّ عَلَىٰ يَدَيْهِ — to bite one's hands: the bodily expression of regret. In Arabic the idiom is named together with anger and helplessness.
I record this as an observation, and its ground is the word itself: the verse gives no name. The sentence thereby becomes readable for any friendship at all — and indeed the accounts of particular incidents transmitted in the classical commentaries do not remove that generality.
خَلِيل — root خ-ل-ل: the sense the lexicographers give is love working its way into the interstices (khilāl) of the heart. That is, a khalīl is not a companion at the surface — he is a friend who has got inside.
The same reversal was treated at al-Zukhruf 43/67 (al-akhillāʾu yawmaʾidhin baʿḍuhum li-baʿḍin ʿaduww), and it had also occurred at al-Aḥqāf 46/6. Three sūras describe the same reversal: friendship turned inside out.
وَكَانَ ٱلشَّيْطَٰنُ لِلْإِنسَٰنِ خَذُولًا — khadhūl: one who leaves another alone, who abandons him at the very moment of need. An intensive form.