For though I were righteous, I could not answer Him; I would beg mercy of my Judge. (Job 9:15)
In the Name + of Jesus. Amen. Did you ever sit around and argue with your friends about something? You know how it goes, you start discussing something and then people start pushing their opinions and pretty soon it's a full-fledged debate and argument! That's what Job was doing. He struggled with the suffering God allowed him to have. He was talking with friends who weren't much help. They figured the Lord was punishing Job for something he did. Job said that even if he were righteous, he wouldn't be able to stand before God.
You could be the most sinful, detestable, filthy, rotten sinner ever. You could be the most holy, righteous, well-intentioned, humble, helping, perfect person ever. Neither one matters: They are both doomed before God. Only ONE thing makes us righteous in God's sight: Jesus. Job knows that even if he's a “good person” he can't make God happy. But Job knows the promise of the Savior and that's what He trusts in.
If you look at your sins, you might conclude that God could never love you. If you look at the good things you do for others, you might guess that God might like you at least a little bit. Both are wrong. Both put the focus on entirely the wrong place: YOU! Only one thing makes you holy in God's sight: Jesus. Jesus, because He took your sins and died for them.
So how do you know whether you are righteous before God? Your Baptism says so. Absolution says so. The Gospel of Christ's death and resurrection for you says so. The body and blood of Jesus say so. That's it. We're rescued from trying to figure out how our sins versus our good works come out in the equation. It's all Jesus and His gifts. Job can't answer the Lord. You can't answer the Lord. But both you and Job, being in Jesus, have the Lord's answer of pardon and peace. In the Name of Jesus. Amen.
Thy righteousness, O Christ, Alone can cover me; No righteousness avails Save that which is of Thee. To whom save Thee, Who canst alone For sin atone, Lord, shall I flee? (LSB 565:5)