Romans 7 to which you've referred here is just the preface to Romans 8 in which Paul explained the resolution to the "wretched man" condition he'd described. In fact, in the very next verse following the one in which he speaks of being a "wretched man," Paul wrote:
Romans 7:24-25
24 Wretched man that I am! Who will deliver me from this body of death?
25 Thanks be to God through Jesus Christ our Lord! ...
In chapter 8, Paul explained what he meant here, what the route to victory over the "wretched man" condition was, exactly:
Romans 8:4
4 ...the righteous requirement of the law might be fulfilled in us, who walk not according to the flesh but according to the Spirit.
This is the same thing Paul wrote to the Galatians:
Galatians 5:16
16 But I say, walk by the Spirit, and you will not gratify the desires of the flesh.
and,
Galatians 5:25
25 If we live by the Spirit, let us also walk by the Spirit.
So, the Christian person who is "walking in the Spirit," not just "living in the Spirit," is able not to gratify the desires of the flesh and to fulfill the righteous requirement of the law of God. What is it to "walk in the Spirit"?
Galatians 5:18
18 But if you are led by the Spirit, you are not under the Law.
Romans 8:14
14 For all who are being led by the Spirit of God, these are sons of God.
It's possible to be a truly born-again person, an adopted child of God, and not be living "in step" with the Holy Spirit, following his lead in everything. The Corinthian believers illustrated this very well:
1 Corinthians 3:1-3
1 And I, brethren, could not speak to you as to spiritual men, but as to men of flesh, as to infants in Christ.
2 I gave you milk to drink, not solid food; for you were not yet able to receive it. Indeed, even now you are not yet able,
3 for you are still fleshly. For since there is jealousy and strife among you, are you not fleshly, and are you not walking like mere men?
Though they were "in Christ" brethren, though, as such, they lived in/by the Spirit, these believers were carnal, fleshly and living in jealousy and strife, as a result. They were saved, but carrying on in the "wretched man" condition Paul described in Romans 7, not "walking in the Spirit" at all.
What's the essence of "walking in the Spirit"? What does it mean to be "led by the Spirit"? Again, Paul took pains to explain this to the believers at Rome:
Romans 6:12-14
12 Therefore do not let sin reign in your mortal body so that you obey its lusts,
13 and do not go on presenting the members of your body to sin as instruments of unrighteousness; but present yourselves to God as those alive from the dead, and your members as instruments of righteousness to God.
14 For sin shall not be master over you, for you are not under law but under grace.
Here, Paul identified the key to "walking in the Spirit" and thus gaining victory over the flesh: Presenting (or yielding) oneself to God as an "instrument of righteousness." The fundamental idea in this is submission to God:
Romans 6:18-22
18 and having been freed from sin, you became slaves of righteousness.
19 I am speaking in human terms because of the weakness of your flesh. For just as you presented your members as slaves to impurity and to lawlessness, resulting in further lawlessness, so now present your members as slaves to righteousness, resulting in sanctification.
20 For when you were slaves of sin, you were free in regard to righteousness.
21 Therefore what benefit were you then deriving from the things of which you are now ashamed? For the outcome of those things is death.
22 But now having been freed from sin and enslaved to God, you derive your benefit, resulting in sanctification, and the outcome, eternal life.
Paul couldn't be clearer, I think, that the key to a holy life, to conquering all sin, is being "enslaved to God" or, put another way, to be "walking in (led by) the Spirit." He described this "enslavement" to God as follows in chapter 12 of his letter to the Christians at Rome:
Romans 12:1
1 Therefore I urge you, brethren, by the mercies of God, to present your bodies a living and holy sacrifice, acceptable to God, which is your spiritual service of worship.
The idea here is a total conscious, explicit and persistent giving over of oneself - enslavement - to God to do with as He pleases. No "take backsies"; no partial sacrifice, no "You can have this area God, but not that one"; no "Help me, God, to do my own will." It's only in this condition of constant submission to God that a believer actually "walks in the Spirit," which is, as Paul wrote, the essential factor in not fulfilling the desires of the flesh (Galatians 5:16) of not being the "wretched man" of Romans 7.
Why is this? Because to not be "walking in/by the Spirit," to not be "led by the Spirit," to not be a "living sacrifice to God, to not be "enslaved to God," is to be in rebellion toward Him. God will not aid a rebel but actually opposes such a person, saved or not.
James 4:6-7
6 ..."God is opposed to the proud but gives grace to the humble."
7 Submit therefore to God...
1 Peter 5:5-6
5 ... “God opposes the proud but gives grace to the humble.”
6 Humble yourselves, therefore, under the mighty hand of God so that at the proper time he may exalt you,
When a believer is conscious, explicitly, and persistently submitted to the will and way of the Holy Spirit, he goes to work on them, changing their desires, thinking and conduct in conformity to Jesus Christ (Romans 8:29), making them increasingly holy vessels, fit for the Master's use.
Romans 8:12-13
12 So then, brothers, we are debtors, not to the flesh, to live according to the flesh.
13 For if you live according to the flesh you will die, but if by the Spirit you put to death the deeds of the body, you will live.
2 Corinthians 3:18
18 And we all, with unveiled face, beholding the glory of the Lord, are being transformed into the same image from one degree of glory to another. For this comes from the Lord who is the Spirit.
Philippians 1:6
6 And I am sure of this, that he who began a good work in you will bring it to completion at the day of Jesus Christ.
Philippians 2:13
13 for it is God who works in you, both to will and to work for his good pleasure.
Philippians 4:13
13 I can do all things through him who strengthens me.
Ephesians 3:16
16 that according to the riches of his glory he may grant you to be strengthened with power through his Spirit in your inner being,
Ephesians 6:10
10 Finally, be strong in the Lord and in the strength of his might.
Galatians 5:22-23
22 But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness,
23 gentleness, self-control; against such things there is no law.
And so on. When born-again children of God are being constantly led by the Spirit, when they are constantly under his control, then it is that his life and power works in them, empowering and changing them.
The Great Battle of Christian living, then, isn't to force, compel or make oneself do what God wants, but to remain yielded to God, to the control of His Spirit, so that he is free to transform one's desires, thinking and behavior.
This is the way of the flesh, of self-effort, to do what only God can do. Like begets like. A cat, begets a cat, a dog begets a dog, and you can only beget more of you. Only God can beget godliness in us and He does this only as we are "walking in the Spirit." Paul said as much to the believers in Galatia and at Colosse:
Galatians 3:1-3
1 O foolish Galatians! Who has bewitched you? It was before your eyes that Jesus Christ was publicly portrayed as crucified.
2 Let me ask you only this: Did you receive the Spirit by works of the law or by hearing with faith?
3 Are you so foolish? Having begun by the Spirit, are you now being perfected by the flesh?
Colossians 2:20-23
20 If with Christ you died to the elemental spirits of the world, why, as if you were still alive in the world, do you submit to regulations—
21 “Do not handle, Do not taste, Do not touch”
22 (referring to things that all perish as they are used)—according to human precepts and teachings?
23 These have indeed an appearance of wisdom in promoting self-made religion and asceticism and severity to the body, but they are of no value in stopping the indulgence of the flesh.