Jesus is not losing faith in God. He is proclaiming his humanity which includes feeling forsaken and being ignorant. It is ok for people to ask God the same question Jesus asks on the cross.
Jesus quoted Psalm 22:1 which begins with, "My God, My God, why hast Thou forsaken Me?". Jesus quoted this Psalm in order to draw attention to it and the fact that He was fulfilling it there on the cross.
Jesus never lost his faith in God.
In Psalm 22:11-18 it says;
Be not far from me, for trouble is near; For there is none to help.12 Many bulls have surrounded me; Strong bulls of Bashan have encircled me. 13 They open wide their mouth at me, As a ravening and a roaring lion. 14 I am poured out like water, And all my bones are out of joint; My heart is like wax; It is melted within me. 15 My strength is dried up like a potsherd, And my tongue cleaves to my jaws; And Thou dost lay me in the dust of death. 16 For dogs have surrounded me; A band of evildoers has encompassed me; They pierced my hands and my feet. 17 I can count all my bones. They look, they stare at me; 18 They divide my garments among them, And for my clothing they cast lots.
Jesus is pointing to the scriptures to substantiate His messianic mission.