There is no sahīh (authentic) hadith that I know of to the exact meaning of what you are asking about. There are lots of authentic hadiths about the rewards Muslims get in the Hereafter for their pain and suffering in this world. There are two hadiths that are commonly referred to in this context, though.
The first hadith is a hassan (good) hadith in Jami' at-Tirmidhi, and was also narrated (very similar wording) by Ibn Mas'ūd in Al-Mu'jam al-Kabir by At-Tabarani and by Masrūq in Musannaf Ibn Abi Shaiba:
حَدَّثَنَا مُحَمَّدُ بْنُ حُمَيْدٍ الرَّازِيُّ، وَيُوسُفُ بْنُ مُوسَى الْقَطَّانُ الْبَغْدَادِيُّ، قَالاَ حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَغْرَاءَ أَبُو زُهَيْرٍ، عَنِ الأَعْمَشِ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " يَوَدُّ أَهْلُ الْعَافِيَةِ يَوْمَ الْقِيَامَةِ حِينَ يُعْطَى أَهْلُ الْبَلاَءِ الثَّوَابَ لَوْ أَنَّ جُلُودَهُمْ كَانَتْ قُرِضَتْ فِي الدُّنْيَا بِالْمَقَارِيضِ " . وَهَذَا حَدِيثٌ غَرِيبٌ لاَ نَعْرِفُهُ بِهَذَا الإِسْنَادِ إِلاَّ مِنْ هَذَا الْوَجْهِ . وَقَدْ رَوَى بَعْضُهُمْ هَذَا الْحَدِيثَ عَنِ الأَعْمَشِ عَنْ طَلْحَةَ بْنِ مُصَرِّفٍ عَنْ مَسْرُوقٍ قَوْلَهُ شَيْئًا مِنْ هَذَا .
Jabir narrated that the Prophet (s.a.w) said: "On the Day of Judgement, when the people who were tried (in this world) are given their rewards, the people who were pardoned (in life), will wish that their skins had been cut off with scissors while they were in the world." This Hadith is Gharib, we do not know of it with this chain except through this route. Some of them have reported something similar to this Hadith from Al-A'mash, from Talhah bin Musarrif from Masruq.
— Jami' at-Tirmidhi, Book 36, Hadith 100
There is another hadith in Al-Mu'jam al-Kabir, but it is graded daʻīf (weak) as it has Mujjā'a ibn az-Zubair, whom Ad-Daraqutni considered weak in hadith:
وفيه مجاعة بن الزبير وثقه أحمد وضعفه الدارقطني
حَدَّثَنَا السَّرِيُّ بْنُ سَهْلٍ الْجُنْدِيسَابُورِيُّ، ثنا عَبْدُ اللهِ بْنُ رُشَيْدٍ، ثنا مُجَّاعَةُ بْنُ الزُّبَيْرِ، عَنْ قَتَادَةَ، عَنْ جَابِرِ بْنِ زَيْدٍ، عَنِ ابْنِ عَبَّاسٍ، عَنِ النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: يُؤْتَى بِالشَّهِيدِ يَوْمَ الْقِيَامَةِ فَيُنْصَبُ لِلْحِسَابِ، وَيُؤْتَى بِالْمُتَصَدِّقِ فَيُنْصَبُ لِلْحِسَابِ، ثُمَّ يُؤْتَى بِأَهْلِ الْبَلَاءِ، وَلَا يُنْصَبُ لَهُمْ مِيزَانٌ، وَلَا يُنْشَرُ لَهُمْ دِيوَانٌ فَيُصَبُّ عَلَيْهِمُ الْأَجْرُ صَبًّا حَتَّى إِنَّ أَهْلَ الْعَافِيَةِ لَيَتَمَنَّوْنَ فِي الْمَوْقِفِ أَنَّ أَجْسَادَهُمْ قُرِضَتْ بِالْمَقَارِيضِ مِنْ حُسْنِ ثَوَابِ اللهِ لَهُمْ
NOTE. My own translation, so treat with care.
Ibn 'Abbas narrated that the Prophet ﷺ said: "A martyr is brought forth on the Day of Judgment for his reckoning, and a donator of charity for his reckoning, then the people of suffering are brought forth and no scale is set up for them and no records are spread, then the rewards pour on them that the people who were healthy in their worldly life wish in this situation if their skins had been cut off with scissors from the amount of rewards from Allah that they [those with sufferings] get.
— Al-Mu'jam al-Kabīr, Vol. 12, pp. 182, Hadith 12829