The gospel of Matthew in the 27th chapter verses 45-46 says; Now from the sixth hour there was darkness over all the land unto the ninth hour. And about the ninth hour Jesus cried with a loud voice, saying, Eli, Eli, lama sabachthani? that is to say, My God, my God, why hast thou forsaken me?
It is thought by many that these events at the cross (along with others) was God's reaction towards the sin his Son bore on behalf of the world. I don't believe that God ever separated himself from Jesus, neither did Jesus ever stop trusting that his Father was with him.
David in Psalm 22 starts with the words Matthew uses indicating that there is a connection between what David said and what Jesus is saying. This is actually in perfect keeping with the constant example of the whole life of Jesus in meeting every crisis with a quotation from the Holy Scriptures. "It is written; it is written; and again it is written". In support of this view is the remarkable number of specific prophecies relative to the crucifixion which are contained in Psalms 22, and which were at that very moment being fulfilled so graphically before all.
This remarkable word picture of the crucifixion contains at least twenty specific details, some of which are not even found in the gospels. This Psalm is quoted by Jesus when hanging on the cross. It is His aim to teach that the events on the cross that were prophesied about Him are being fulfilled.
Why? Because the understanding of those present was that anyone hanging on a cross was the worst of criminals, that they deserved to be punished for what they have done.
Jesus draws attention to the Psalm with all of it's significant parallels to what he is presently going through and makes it clear by the Psalm that he was not deserving of this punishment but rather has been accused unjustly.
As we read the entire Psalm it begins with what appears as if God has left Jesus, but verses 21 and 24 is the turning point that states that Jesus was never left alone. Jesus Himself says it in John 16:32 Behold, the hour cometh, yea, is now come, that ye shall be scattered, every man to his own, and shall leave me alone: and yet I am not alone, because the Father is with me.
Jesus died as a sacrifice for our sins, the perfect sinless Lamb of God.
Consider what I say and may the Lord giveth thee understanding