Thus, I say, God deals with his saints in great variety; some shall have all their bones broken, when others shall have only the gentle strokes of the rod. We are in the hand of mercy, and he may deal with us as seems good to him; but for our parts, great sins ought to be attended with expectations of great depths and perplexities.
(John Owen, An Exposition of Psalm CXXX)
God, being merciful, does not deal with us according to what our sins deserve. He remembers that we are but dust. Nevertheless, he does chastise us for our sins. Even so, in his inscrutable wisdom, he treats his children differently. Some who have sinned greatly he rebukes gently and allows them to recover their peace in him without the great difficulty that others have in trying to recover themselves from their backsliding. Others he treats more severely, allowing them to wallow for a long time in the depths of the misery that may justly be considered as the consequence of their sins. This might seem discriminatory, but God has his reasons, and it is not for us to question his wisdom.
At the end of day, however he deals with us, we trust that he disciplines us according to his love and wisdom, and the result of it all is that we shall come forth as gold.