The sins of the world were poured into Christ and the HolySpirit left His body.

Even in His last moments Jesus fulfilled the Word. Psa 22:1-* is what He was referencing in His last cry.