How to live a righteous life?

Realizing sin exists in me yet I am a new creature in Christ I have struggled with why I am not now righteous. Or, to put it differently, why do I continue to be ( a verb) so unrighteous?

It dawned on me after reading Tim Keller’s The Freedom of Self Forgetfulness I should no longer fixate on my self and my sin.
My focus should be on my already perfect rightness provided by the death of Jesus and imputed to me by God.
I, then, should consider myself righteous. By this I can live by faith. For in it the righteousness of God is revealed from faith for faith, as it is written, “The righteous shall live by faith.” Romans 1:17
By living through faith I am righteous. I no longer need to work at righteousness. The righteousness of God through faith in Jesus Christ for all who believe. For there is no distinction: for all have sinned and fall short of the glory of God,and are justified by his grace as a gift, through the redemption that is in Christ Jesus, whom God put forward as a propitiation by his blood, to be received by faith. This was to show God’s righteousness,righteousness, because in his divine forbearance he had passed over former sins. It was to show his righteousness at the present time, so that he might be just and the justifier of the one who has faith in Jesus. Romans 3: 22-27.