Until the crucifixion, He remained One with the Father in perfect unity. But because God could not look on sin, and Jesus had taken our sins on Himself in order that He might become our anointing sacrifice, the Father turned away from the Son. He knew He had come into this world for one purpose, and that was to die for your sin. Instead, He was asking the Father if there was another way other than separation from His loving heavenly Father. When we are separated from God because of sin or lack of belief, there is a sickness to our souls.
Sin brings a sense of hopelessness and so can rebellion.
God knows when we face horrendous situations. He hears our cries. Even those who maintain the closest fellowship are not immune to feelings of hopelessness. However, there is another factor at work, and that is God's providential care. Many times God allows us to face circumstances and situations of hopelessness so our faith can be tested and tried.