I believe Jesus was quoting Mark 27:46 to show the spectators that His crucifixion had been prophesied by David at Psalm 22. Demonstrating that He was in fact the "suffering Servant" that had been promised by the Old Testament prophets.
It's important to note that David's immediate reason for writing Psalm 22 was to describe his own feelings of forsakenness while he was being hunted down and persecuted by King Saul.
Like many of the Davidic Psalms, he began by complaining that God had left him. He says at vs11, "Be not far from me, for trouble is near; For there is none to help. Vs12, "Many bulls have surrounded me; Strong bulls of Bashan have encircled me."
I am poured out like water, and my bones are out of joint; My heart is like wax. It is melted within me. My tongue cleaves to my jaws; And Thou does lay me in the dust of death. For dogs have surrounded me; They pierced my hands and my feet.
Then at vs19, "But Thou O Lord be not far off; O Thou my help, hasten to my assistance. Verse 21, "Save me from the lion's mouth; and from the horns of the wild oxen Thou dost answer me."
At vs22 David begins to give exultation of God's goodness when he realized that He never really did forsake him at all. This is made clear at verses 23-24, "You who fear the Lord, praise Him; All you descendants of Jacob, glorify Him etc. Vs24, "For He has not despised nor abhorred the affliction of the afflicted.; Neither has He hidden His face for help, He heard."
Now, here is what Jesus said at John 16:32, "Behold, an hour is coming and has already come for you to be scattered, each to his own home, and to leave Me alone; AND YET I AM NOT ALONE, BECAUSE THE FATHER IS WITH ME."
Also at 2 Corinthians 5:19, "namely, that God was in Christ reconciling the world to Himself, not counting their trespasses against them, and He has committed to us the word of reconciliation."
On a personal note when I arrived in Vietnam in January of 1968, the Tet offensive just started. Tet is the Lunar New Year in Vietnam. It was an absolutely horrible time. I thought just about everyday that God had forsaken me. But He did not, here I am 53 years later. I'm positive that many Christians FEEL the same way when put in situations that seem impossible to get out of.
I also have to disagree with the following words in another posters comments. "Even though he knew he would be abandoned by virtually all his followers, the worst abandonment was that of the Father, forsaking the Son (Mark 15:34)." Yes, His followers did abandon Him, but His Father did not.
In years past I have heard others say, "The Father abandoned His Son.' Or "the Father cannot look at sin so He turned away from His Son." At Luke 22:42 Jesus' prayer is quite intense and shows His humanity. "Father; if Thou are willing, remove this cup from Me; yet not My will, but Thine be done." Jesus is praying for His death to be averted, but only if it is the Father's will. We know the Father did not alleviate His suffering and in my opinion His Father did not forsake Him.