Our righteousness is not based on OUR faith, but the faith OF Jesus. And the only way to be “justified” (declared righteous) is to be a recipient of the “faith OF Jesus”.
“...the righteousness of God is through the faith of Jesus Christ to all...(Romans 3:22)
If your version of the Bible says "faith IN Jesus", it is wrong. Any honest translator with a Greek Interlinear will clearly see the proper translation is "faith OF Jesus". Nothing wrong with having faith IN Jesus, but that is not the context in the above verses which are talking about the faith that Jesus had, not our faith.
For it is by Grace you have been saved, through FAITH - and that NOT OF YOURSELVES, it is the GIFT OF GOD...we have fixed our hope on the living God, who is the Savior of all men...Fixing our eyes on Jesus, the author and perfecter of FAITH, who for the joy set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God.” (Ephesians 2:8; 1 Timothy 4:10; Hebrews 12:2-3)
Jesus had faith that His suffering and death on the Cross was the RIGHT thing for God to do in order to save all mankind. His death was the only sacrifice that could do so, and therefore Jesus "endured the cross" because he knew that...
And what is it that God "wills" and therefore sent Jesus to do?
"This is good and acceptable in the sight of God our Savior, who WILLS all men to be saved and to come to the knowledge of the truth. For there is one God, and one mediator also between God and men, the man Christ Jesus, who gave Himself as a ransom FOR ALL, the testimony given at the proper time." (1 Timothy 2:3-7)