But the mercy of the LORD is from everlasting to everlasting upon them that fear him, and his righteousness unto children's children; Psalms 103:17 KJV
God has mercy on them that fear Him. There are a number of powerful things that are inferred by this verse:
1. God does not decide to measure mercy to you based on the severity of your sin, but rather on the sincerity of your fear. If you fear Him, God will grant you mercy even in time of great failure. If one truly fears God He will give mercy and be long-suffering, because God knows that the person who fears him will eventually get it right. The person who does not fear God will continue to abuse the mercy and grace of God.
David's sins were much more egregious that those of Saul, but David feared the LORD (Psalm 103:17) and Saul feared the people (1 Samuel 15:14-15). Saul and David's stories end drastically different because of one single quality, the fear of God.
2. The second thing that this verse tells us, it is possible to fear God and fail God. It is often misunderstood that if you fear God you won't fail God. The measure of whether or not a person fears God is NOT determined by the magnitude of their sin, but the magnitude of their repentance. You can fear God and fail Him, but the fear of God will cause you to come to deep and complete repentance.
Note the difference in how the just man sins (Psalms 37:23-24; Micah 7:8-10), and how the wicked sins.
Psalms 36:1-12 KJV
1 To the chief Musician, A Psalm of David the servant of the LORD. The transgression of the wicked saith within my heart, that there is no fear of God before his eyes.
2 For he flattereth himself in his own eyes, until his iniquity be found to be hateful.
3 The words of his mouth are iniquity and deceit: he hath left off to be wise, and to do good.
4 He deviseth mischief upon his bed; he setteth himself in a way that is not good; he abhorreth not evil.
5 Thy mercy, O LORD, is in the heavens; and thy faithfulness reacheth unto the clouds.
6 Thy righteousness is like the great mountains; thy judgments are a great deep: O LORD, thou preservest man and beast.
7 How excellent is thy lovingkindness, O God! therefore the children of men put their trust under the shadow of thy wings.
8 They shall be abundantly satisfied with the fatness of thy house; and thou shalt make them drink of the river of thy pleasures.
9 For with thee is the fountain of life: in thy light shall we see light.
10 O continue thy lovingkindness unto them that know thee; and thy righteousness to the upright in heart.
11 Let not the foot of pride come against me, and let not the hand of the wicked remove me.
12 There are the workers of iniquity fallen: they are cast down, and shall not be able to rise.
Psalms 37:23-24 KJV
23 The steps of a good man are ordered by the LORD: and he delighteth in his way.
24 Though he fall, he shall not be utterly cast down: for the LORD upholdeth him with his hand.
The wicked sins and shall not be able to rise up (Psalms 36:12), but when the good man sins the LORD upholdeth him (Psalm 37:23-24); the difference is the fear of the LORD.