David is contemplating the frailty of life and our sin. And then he breaks out into confession and experiences God's mercy.