"Then Joseph her husband, being a just man, and not willing to make her a publick example, was minded to put her away privily." (Matthew 1: 19)
In the account of Jesus' birth, we find the work of God's grace fully at work, not just in the genealogy of Jesus, which named three Gentile women as well as the adulterous wife of Uriah, but also in the account of Jesus' adopted earthly parents.
The passage above acknowledges Joseph as Mary's husband, even before they were married, and even when he was about to put her away because she was pregnant.
God calls us what we are, even before we know, and even when we attempt to change it:
"Before I formed thee in the belly I knew thee; and before thou camest forth out of the womb I sanctified thee, and I ordained thee a prophet unto the nations." (Jeremiah 1: 5)
"(As it is written, I have made thee a father of many nations,) before him whom he believed, even God, who quickeneth the dead, and calleth those things which be not as though they were." (Romans 4: 17)
Now, we also see in the above passage that Joseph was " a just man", meaning he was righteous.
He was called righteous not because of what he did, and righteousness is not about what we do, anyway.
It is the gift of God:
"For if by one man's offence death reigned by one; much more they which receive abundance of grace and of the gift of righteousness shall reign in life by one, Jesus Christ." (Romans 5: 17)
"8For by grace are ye saved through faith; and that not of yourselves: it is the gift of God: 9Not of works, lest any man should boast." (Ephesians 2: 8-9)
Today, God calls us righteous because of His Son Jesus:
"For he hath made him to be sin for us, who knew no sin; that we might be made the righteousness of God in him." (2 Corinthians 5: 21)
He also calls us His children because we are in Christ:
"For as many as are led by the Spirit of God, they are the sons of God. 15For ye have not received the spirit of bondage again to fear; but ye have received the Spirit of adoption, whereby we cry, Abba, Father." (Romans 8: 14-15)
"Herein is our love made perfect, that we may have boldness in the day of judgment: because as he is, so are we in this world." (1 John 4: 17)
Instead of looking at ourselves, or what other people say about us, let us take God's Word for who we are, because He has declared it.