"But what happens if and when I sin?" you may ask. "Do I then forfeit my sonship and cease to be God's child?" No. Think of the analogy of a human family. A boy is offensively rude to his parents. A cloud descends on the home. There is tension in the atmosphere. Father and son are not on speaking terms. What has happened> Has the boy ceased to be a son? No. Their relationship has not changed; it is their fellowship which has been broken. Relationship depends on birth; fellowship depends on behavior. As soon as the boy apologizes, he is forgiven. And forgiveness restores fellowship. Meanwhile, his relationship has remained the same. He may have been temporarily a disobedient, and even a defiant, son; but he has not ceased to be a son. So it is with the children of God.
-- John Stott, Basic Christianity

Even if I caused you sorrow by my letter, I do not regret it. Though I did regret it -- I see that my letter hurt you, but only for a little while -- yet now I am happy, not because you were made sorry, but because your intended and so were not harmed in any way by us. Godly sorrow brings repentance that leads to salvation and leaves no regret, but worldly sorrow brings death.
2 Corinthians 7:8-10