Chapter six and seven's context continues into eight. However what many seem to miss is Paul proclaims in verse two of chapter eight His deliverance from the Law of sin and death which he claimed to be in service to through his flesh in verse 7:23, 25. Please follow along.
For I delight in the law of God after the inward man: But I see another law in my members, warring against the law of my mind, and bringing me into captivity to the law of sin which is in my members. O wretched man that I am! who shall deliver me from the body of this death? I thank God through Jesus Christ our Lord. So then with the mind I myself serve the law of God; but with the flesh the law of sin.
(Rom 7:22-25)
Chapter seven's use of the word mind is dealing with head knowledge; knowing the law and desiring to serve it because you know it is good and makes sense to you to do so. This did not work for Paul nor will it work for us. The only way is Jesus Christ.
There is therefore now no condemnation to them which are in Christ Jesus, who walk not after the flesh, but after the Spirit. For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death. For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh: That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
(Rom 8:1-4)
Paul claims he had been Made me free from the law of sin and death. No longer in captivity to the Law of sin which which is in His members. HE HAS BEEN MADE FREE! That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit. For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh: Knowing this, that our old man is crucified with him, that the body of sin might be destroyed, that henceforth we should not serve sin. For he that is dead is freed from sin. (Rom 8:2-4; 6:6,7)
Set free from the Law of sin and death. Our old man crucified with with HIM that the Body of Sin be destroyed. That Hence forth we should not serve sin. For he that is dead is freed from sin through Jesus Christ. Who his own self bare our sins in his own body on the tree, that we, being dead to sins, should live unto righteousness: by whose stripes ye were healed.
(1Pe 2:24 KJV)