If you think you're righteous in God's sight because you're doing good, well, you're walking backwards right through the doorway of judgment! You're looking at God's righteousness but you're getting further and further away from it when you trust in your own righteous acts. Abraham believed God and didn't trust his own works. And God saw that! God credited Christ's righteousness to Abraham because of his faith, not his works.
You can't get into heaven on your own works. You get into heaven by believing in Christ's good works for you!