I think we can know that what God says is true, but only He knows our hearts and has the final judgement. It's not anything to worry over if we fervently love Him and seek Him. It's a matter that is hidden to us really. The goats are surprised at their rejection because of all of their works, and the lambs are surprised that they have done works toward Christ at all. For me, I can be assured or doubt based on my emotions, because I'm human, but really I should simply believe God's Word on the matter.
With sincere faith, and by walking in the Spirit, we can obey the command mean of love. Love that sets all affection upon the Lord, and love that abounds from us to others...radiating love. This love is honest and in the light, and it is followed by washing the feet of the saints, practicing hospitality, caring for children and widows, giving to the poor, and so on all in the name of Jesus. Our belief in God, since we take Him at His Word, should also instill in us a Holy fear that makes us hate sin, pride, self-rightesousness, and all manner of evil...we should not want it in our lives.
God is also merciful to us, though, when we fail, when we lack knowledge. These things are part of being immature believers. As we learn about Jesus, and practice being like Him, by His grace we will mature past some of the fundamentals. He knows the work He will complete in us. We should study to show ourselves approved to Him (this includes the New Testament instruction in righteousness), love His precepts as David, repent when we stumble (because we are not lawless having the Spirit in us), and be willing to let God use us in any way. It's the lawless that will practice evil, even if their works appear good, and they are eventually given over to it, because they have not the Spirit in them, but are self-righteous.
Since I have been following Him, He has been transforming me into His image, and I can not do that myself, but He has given me the mind of Christ and the wisdom of the Spirit so that I may participate in following Him, and all of this is to bring me to maturity...to bear fruit or Him. This is an ongoing process.
The Lord bless you.