God chooses us for His glory and not on account of any good in us. John Calvin comments that God’s glory is revealed in destroying the reprobate, because the only thing that separates the elect from the reprobate is that the elect “are delivered by the Lord from the same gulf of destruction [as the reprobate] … by no merit of their own, but through his gratuitous kindness.” Let God’s elect—those who persevere in faith—remember this and learn humility.
God continues to save people who, having been in covenant with Him, sin gravely and put themselves out of the visible covenant community via excommunication. The Lord promises that no matter what we have done, He is faithful and just to forgive us our sins when we repent and believe the gospel (1 John 1:8-9). If you have put yourself outside of God’s visible church by your sin, know that the Lord is willing and waiting to forgive you when you repent.