David composes this psalm for public worship and as such does not give particular detail of his sins. This enables you to take his words upon your own lips. God has rebuked him with great bodily suffering. There may be a connection between your bodily ailments and your sin but not necessarily so -John 9-. David gives three reasons why God should forgive him and heal him- God's nature, His covenant, and David's continued thanksgiving.