"And he did that which is right in the sight of the LORD, but not with a perfect heart."
A friend gave me a clipping last year of a bleeding heart plant. For a long time I waited and waited for it to bud. I was amazed at how it looked like a bud being held out by its petals. In other words, the heart is in sight. Only God knows our heart even when our deeds may look righteous on the outside. I think this relates to why we do not enter the Kingdom of God by works alone. The heart is deceitful. It is impure. But it is made righteous by the atonement and sanctification of Jesus Christ being invited into our lives. Only He can make all things beautiful.
Dear friend, please stop and take a moment to acknowledge that there is nothing we can do to earn our way into heaven. Jesus is the sinless lamb that died for our sins. Only He can be the perfect substitution for us to be allowed in heaven, for the wages of sin would be death.
Repent of your wrong-doings, acknowledge Him as LORD and invite Him to be a part of your life.