The author to the Hebrews tells us that it was fitting for the Son of God to become a man. Only by becoming like His people in everything (except for sin) could He offer Himself as a perfect sacrifice for their sins, making full atonement for them and reconciliation with God. The suffering and temptations He endured also enable Him to sympathize with our weaknesses and to help us when we are tempted.
If we truly love and trust Jesus Christ alone for salvation, confessing our sins, we need to realize that He has removed all our guilt and punishment. However, if we do not love and trust in Him, we need to repent and have faith in Him because there is no other way to be saved.