It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Holy Prophet (peace and blessings of Allah be upon him) said: Whatever worry, hardship, sorrow, grief, or pain afflicts a Muslim, even if a thorn pricks him, Allah expiates his sins in return for it.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 8424