Jesus words on the Cross are from Psalm 22, which He is using to express the intense physical pain that He is feeling. This psalm describes a righteous man who is suffering various afflictions:
vs. 1: My God, my God, why hast thou forsaken me? Why art thou so far from helping me, from the words of my groaning?
vs. 7-8: All who see me mock at me, they make mouths at me, they wag their heads; "He committed his cause to the LORD; let him deliver him, let him rescue him, for he delights in him!"
vs. 14-18: I am poured out like water, and all my bones are out of joint; my strength is dried up like a potsherd, and my tongue cleaves to my jaws; Yea, dogs are round about me; a company of evildoers encircle me; they have pierced my hands and feet -- I can count all my bones -- they stare and gloat over me; they divide my garments among them, and for my raiment they cast lots.
Remember, these are David’s words, from his 22nd psalm, yet they vividly describe many of the torments that Jesus faced during his Passion.
But, this is not the only reason why Jesus has chosen this psalm. In its concluding verses, the righteous man, though he suffers so greatly, has his hope firmly rooted in the Lord. He praises the Lord and knows without a doubt that the Lord will deliver him:
vs. 22-24: I will tell your name to my brethren; in the midst of the congregation I will praise you: You who fear the Lord, praise him! all you sons of Jacob, glorify him, and stand in awe of him, all you sons of Israel! For he has not despised or abhorred the affliction of the afflicted; and he has not hidden his face from him, but has heard, when he cried to him.
vs. 26: The afflicted shall eat and be satisfied; those who seek him shall praise the Lord!
vs. 30-31: Posterity shall serve him; men shall tell of the Lord to the coming generation, and proclaim his deliverance to a people yet unborn, that he has wrought it.
This means that, in quoting Psalm 22, Jesus is reminding us that, even at the point in which He appears to be the most forsaken and forgotten, the Father is with Him and He will be saved. Even in the depths of His suffering, Jesus never ceases to praise and glorify the Father.
In closing, here are the seven last words of Christ, from Mel Gibson's The Passion of the Christ. It's worthwhile to know what these words may have actually sounded like, as Jesus spoke them on the Cross.