Before he sinned and after he confessed and repented.David committed murder and adultery, and yet God said David was "a man after My own heart".
No man can have a dual nature of righteousness and sinfulness at the same time.
"I know I am doing some bad things, but my heart is still good."
False.
The only way we can sin with the flesh, is if our spirit is unrighteous. And the only way we can do God's righteousness is from a pure heart and clean mind.
A good tree cannot bring forth evil fruit, neither can a corrupt tree bring forth good fruit.