The scriptures teach us that the Savior took upon Himself all of our pains, afflictions, temptations, weaknesses, sicknesses and sins so that He could know how we fee land run to us in those moments. Elder Holland explains that it goes even one step further. Jesus Christ while on the cross lost the companionship of the Spirit of His Father and for a moment was entirely alone. And He experienced that feeling of being alone so that we would never have to!
Holland- https://www.churchofjesuschrist.org/study/general-conference/2009/04/none-were-with-him?lang=eng