My reply to your questions:
i. Are God, Jesus and the Holy Spirit all one and the same,
Do you believe that you are body, soul and spirit? Do you believe that you consist of all three and yet you are one person? If you can believe that, why can you not believe that God is three in one?
ii. and if Jesus is God then how did God give his only begotten son,
They are three persons in one. Sometimes it is not easy to understand the things of God. Ask for God's grace and pray that He will open your eyes of understanding.
[1 Cor 2:11]
11 For what man knoweth the things of a man, save the spirit of man which is in him? even so the things of God knoweth no man, but the Spirit of God.
12 Now we have received, not the spirit of the world, but the spirit which is of God; that we might know the things that are freely given to us of God.
13 Which things also we speak, not in the words which man's wisdom teacheth, but which the Holy Ghost teacheth; comparing spiritual things with spiritual.
14 But the natural man receiveth not the things of the Spirit of God: for they are foolishness unto him: neither can he know them, because they are spiritually discerned.
So, if you really want to know and understand these things, come to God and ask Him for His Spirit. Invite Jesus into your life and tell Him that I want to believe and to understand. Let Him open your eyes of understanding because certain things are spiritually discerned. It is very difficult to use the human mind to unlock the things of the kingdom of God.
To come into His kingdom, we have to be born again. Have you been born again, really born again and invited Jesus into your life to be your Lord and Saviour. You have nothing to lose and everything to gain.
iii. and why did Jesus on the cross cry out'My God,Why has thou forsaken me'
Do you know why? Jesus came to take back what the first man Adam has given away to the devil. And He has to come as a man to overcome sin, where Adam has not been able to overcome. Jesus not only overcame sin, He took the penalty of our sin so that we be saved from our sin.
He was stripped of everything He had on the cross to exchange for us our redemption. Do you realize that before He made that statement 'My God,Why has thou forsaken me', He called God 'my Father'. He only called God 'my God' when He was on the cross because for that moment on the cross, He became sin for us. He was separated from God because of our sin and He called God the way we called God, not as Father, but as God.
I believe for that one moment, when all our sins, our curses and our diseases were heaped on Jesus, God the Father had to turn His face away. He was rejected so that we can be accepted or reconciled to God and God will never reject us again. He took the punishment for our sins, so that we will be forgiven. Isaiah 53 has a good description of this and this was prophesied hundreds of years before Jesus came.
3 He is despised and rejected of men; a man of sorrows, and acquainted with grief: and we hid as it were our faces from him; he was despised, and we esteemed him not.
4 Surely he hath borne our griefs, and carried our sorrows: yet we did esteem him stricken, smitten of God, and afflicted.
5 But he was wounded for our transgressions, he was bruised for our iniquities: the chastisement of our peace was upon him; and with his stripes we are healed.
6 All we like sheep have gone astray; we have turned every one to his own way; and the Lord hath laid on him the iniquity of us all.
7 He was oppressed, and he was afflicted, yet he opened not his mouth: he is brought as a lamb to the slaughter, and as a sheep before her shearers is dumb, so he openeth not his mouth.
8 He was taken from prison and from judgment: and who shall declare his generation? for he was cut off out of the land of the living: for the transgression of my people was he stricken.
9 And he made his grave with the wicked, and with the rich in his death; because he had done no violence, neither was any deceit in his mouth.
10 Yet it pleased the Lord to bruise him; he hath put him to grief: when thou shalt make his soul an offering for sin, he shall see his seed, he shall prolong his days, and the pleasure of the Lord shall prosper in his hand.