Our Lord had no doubts in the garden; he simply agonized over the suffering he was to willingly undergo.
I was asked the following question:
Pope Benedict XVI, in his book, Jesus of Nazareth, wrote that our Lord in Gethsemane, was very afraid. Now my question is this: He always told His disciples not to be afraid, to not fear. So how could the One who told everyone not to be afraid be afraid? How is it possible that God the Son lacked courage and was afraid? I really am not trying to criticize the Holy Father, let alone our Lord Jesus. I’m only asking to better understand.
We would need to see what Pope Benedict wrote, with a direct quote in context, and determine if there is any translation issue. In any event, there are different Greek words in play here. Let’s examine the relevant passages (RSV):
Matthew 26:37-38 And taking with him Peter and the two sons of Zeb'edee, he began to be sorrowful and troubled.  Then he said to them, “My soul is very sorrowful, even to death; remain here, and watch with me.”
Mark 14:34 And he said to them, “My soul is very sorrowful, even to death; remain here, and watch.”
Jesus’ emotions in the garden are described with the words lupeo (sorrowful: Strong’s word #3076) — in Matthew 26:37; and perilupos (exceedingly sorrowful: Strong’s #4036) — in Matthew 26:38 and Mark 14:34.
These are neutral terms insofar as the question of sin or right and wrong are concerned. Sorrow and sadness are not sins. Jesus wept when he heard about Lazarus. This is not a sin; it is being human and compassionate: and Jesus had a human nature as well as a divine nature.
Jesus’ instruction to “be not anxious,” on the other hand, use a different word: merimnao (Strong’s #3309). This had to do with anxiety and worry about what the future held in store. Jesus told His followers not to do that, in, for example, the Sermon on the Mount:
Matthew 6:25 Therefore I tell you, do not be anxious about your life, what you shall eat or what you shall drink, nor about your body, what you shall put on. Is not life more than food, and the body more than clothing?
Matthew 6:27-28 And which of you by being anxious can add one cubit to his span of life?  And why are you anxious about clothing? Consider the lilies of the field, how they grow; they neither toil nor spin;
Matthew 6:31 Therefore do not be anxious, saying, `What shall we eat?' or `What shall we drink?' or `What shall we wear?'
Matthew 6:34 Therefore do not be anxious about tomorrow, for tomorrow will be anxious for itself. Let the day's own trouble be sufficient for the day. (cf. also Mt 10:19; Lk 10:41; 12:11, 22, 25-26: all using the same word, merimnao); and the cognate merimna [Strong’s #3308] in Mt 13:22; Mk 4:19; Lk 8:14 and 21:34)
It’s not a case of Jesus saying not to do something, and then doing it Himself.
What Pope Benedict meant by “afraid” (if he used that word) may possibly involve an unfortunate translation, and was perhaps closer to the “sorrowful” of RSV usage. I suspect that if he were asked about it, he would point out some fundamental distinction of definition and concept.
A similar question sometimes arises with regard to the Blessed Virgin Mary and St. Joseph not being able to find Jesus in the temple. It comes down to not only definitions of words, but context. Mary and Joseph were simply concerned about the welfare of their son, which is not a sin. All parents do that. The word for “anxiously” in RSV is a different one: odunao (Strong’s #3600):
Luke 2:48 And when they saw him they were astonished; and his mother said to him, “Son, why have you treated us so? Behold, your father and I have been looking for you anxiously.”
The same word (“sorrowing” in RSV) is used when Paul’s followers say farewell to him (Acts 20:37-38). No sin . . .
Even merimnao is not absolutely prohibited. Paul uses it in the sense of “caring for” (1 Cor 7:32-34) and quite positively in 1 Cor 12:25 and Phil 2:19-20. He used the cognate merimna in 2 Cor 11:28: “anxiety for all the churches.”
Jesus was urging His followers to not worry about what the future holds: getting all anxious over what may or might be. That shows a lack of trust and faith on our part. But He had no doubts in the garden; He simply agonized over the suffering He was to willingly undergo.
Would we really expect Him to be feel otherwise? If He didn’t suffer in some sense, He wouldn’t have a human nature, as He does. This is one reason why we love Him so much: He is like us in almost all respects except for sin.
The Bible states repeatedly (including several instances of Jesus’ own words) that Jesus suffered (Mt 16:21; 17:12; Mk 8:31; 9:12; Lk 9:22; 17:25; 22:15; 24:26, 46; Acts 3:18; 17:3; 26:23; Rom 8:17; 2 Cor 1:5; Phil 3:10; Heb 2:9-10, 18; 5:8; 9:26; 13:12; 1 Pet 1:11; 2:21, 23; 4:1, 13; 5:1).
I looked for excerpts online about this, from the Holy Father. I found the following excepts from his book in a First Things article, dated March 7, 2011:
Jesus’ agony, his struggle against death, continues until the end of the world, as Blaise Pascal said on the basis of similar considerations (cf. Pensées VII, 553). We could also put it the other way around: at this hour, Jesus took upon himself the betrayal of all ages, the pain caused by betrayal in every era, and he endured the anguish of history to the bitter end.
Again, there is no trace of attributing sin to Jesus. But He can agonize in His human nature; that is no difficulty whatever. It is a result of the incarnation and what He came to earth to do on our behalf.