I have a problem understanding the nature of obedience to God's laws. I read and hear that obedience is required for salvation, but no man (besides Jesus) has obeyed perfectly, so please help me understand the nature of the obedience required to please God and enter His eternal abode. Is part of that obedience doing what's necessary when I sin (confess and repent)? How much obedience is what the Lord demands of me? I desire to please God and walk in His ways. I'm just weak in my understanding of obedience. How can I make sure I'm totally forgiven before the Lord?
You are actually asking about the difference between justice and mercy. When a person breaks the law, justice demands that the law breaker be punished, but mercy overrides judgment. “For He who said, "Do not commit adultery," also said, "Do not murder." Now if you do not commit adultery, but you do murder, you have become a transgressor of the law. So speak and so do as those who will be judged by the law of liberty. For judgment is without mercy to the one who has shown no mercy. Mercy triumphs over judgment” (James 2:11-13). “Mercy” means giving less than what was deserved. “The LORD executes righteousness and justice for all who are oppressed. He made known His ways to Moses, His acts to the children of Israel. The LORD is merciful and gracious, slow to anger, and abounding in mercy. He will not always strive with us, nor will He keep His anger forever. He has not dealt with us according to our sins, nor punished us according to our iniquities. For as the heavens are high above the earth, so great is His mercy toward those who fear Him; as far as the east is from the west, so far has He removed our transgressions from us. As a father pities his children, so the LORD pities those who fear Him. For He knows our frame; He remembers that we are dust” (Psalms 103:6-14).
The law demands obedience to the law. How much obedience is demanded? Complete obedience. But none of us are able to keep the law perfectly. While God does not want us breaking the law, He is merciful and will forgive us, if we leave our sin and admit that we were wrong (II Corinthians 7:10-11; I John 1:8-2:1).
How do you know if you are forgiven? We keep reading in I John: "By this we know that we have come to know Him, if we keep His commandments. The one who says, "I have come to know Him," and does not keep His commandments, is a liar, and the truth is not in him; but whoever keeps His word, in him the love of God has truly been perfected. By this we know that we are in Him: the one who says he abides in Him ought himself to walk in the same manner as He walked" (I John 2:3-6). If we are obey God as best we know how, then we know that God is with us. "If we say that we have fellowship with Him and yet walk in the darkness, we lie and do not practice the truth; but if we walk in the Light as He Himself is in the Light, we have fellowship with one another, and the blood of Jesus His Son cleanses us from all sin" (I John 1:6-7).