Kitzur Likutei Moharan I, 74:1
There are sufferings that come upon a person from the aspect of holy judgment, which is the aspect of sufferings of love, the aspect of "whom God loves He rebukes," which is the aspect of distancing that is the beginning of drawing close. And there are sufferings that come from the aspect of impure judgment, God forbid. The sign by which a person can know whether he is in the aspect of impure judgment or the aspect of holy judgment, the sign of the matter is prayer: when there is no cessation of prayer in it, he should know that the sufferings are from the aspect of holy judgment, the aspect of sufferings of love.
View original Hebrew
יֵשׁ יִסּוּרִים שֶׁבָּאִים עַל הָאָדָם מִבְּחִינַת דִּינָא קַדִּישָׁא שֶׁזֶּה בְּחִינַת יִסּוּרִים שֶׁל אַהֲבָה בְּחִינַת "אֲשֶׁר יֶאֱהַב ה' יוֹכִיחַ", שֶׁזֶּה בְּחִינַת הִתְרַחֲקוּת שֶׁהוּא הַתְחָלַת הַהִתְקָרְבוּת, וְיֵשׁ יִסּוּרִים שֶׁבָּאִין מִבְּחִינַת דִּינָא דִּמְסָאֳבָא חַס וְשָׁלוֹם. וְסִימָן שֶׁיֵּדַע הָאָדָם אִם הוּא בִּבְחִינַת דִּינָא דִּמְסָאֳבָא אוֹ בְּחִינַת דִּינָא קַדִּישָׁא סִימָן לַדָּבָר תְּפִילָּה, כְּשֶׁאֵין בּוֹ בִּיטּוּל תְּפִילָּה יֵדַע שֶׁהַיִּסּוּרִים הֵם מִבְּחִינַת דִּינָא קַדִּישָׁא בְּחִינַת יִסּוּרִים שֶׁל אַהֲבָהRead this passage within Part I · Torah 74, in its full context