The unhappiness suffered by a sincere devotee is not technically a karmic reaction.
“A devotee earnestly awaits the mercy of the Supreme Lord even while suffering the painful effects of previous sinful activities. Lord Kṛṣṇa explains in the Bhagavad-gītā that a devotee who fully surrenders unto Him is no longer liable to suffer the reactions of his previous karma. However, because in his mind a devotee may still maintain the remnants of his previous sinful mentality, the Lord removes the last vestiges of the enjoying spirit by giving His devotee punishments that may sometimes resemble sinful reactions. The purpose of the entire creation of God is to rectify the living entity’s tendency to enjoy without the Lord, and therefore the particular punishment given for a sinful activity is specifically designed to curtail the mentality that produced the activity. Although a devotee has surrendered to the Lord’s devotional service, until he is completely perfect in Kṛṣṇa consciousness he may maintain a slight inclination to enjoy the false happiness of this world. The Lord therefore creates a particular situation to eradicate this remaining enjoying spirit. This unhappiness suffered by a sincere devotee is not technically a karmic reaction; it is rather the Lord’s special mercy for inducing His devotee to completely let go of the material world and return home, back to Godhead.
A sincere devotee earnestly desires to go back to the Lord’s abode. Therefore he willingly accepts the Lord’s merciful punishment and continues offering respects and obeisances to the Lord with his heart, words and body. Such a bona fide servant of the Lord, considering all hardship a small price to pay for gaining the personal association of the Lord, certainly becomes a legitimate son of God, as indicated here by the words dāya-bhāk. Just as one cannot approach the sun without becoming fire, one cannot approach the supreme pure, Lord Kṛṣṇa, without undergoing a rigid purificatory process, which may appear like suffering but which is in fact a curative treatment administered by the personal hand of the Lord.”
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Tenth Canto, Chapter 14 – Text 08