The apostles were deeply distressed that Jesus' betrayer was seated in their midst at the Last Supper. However, Jesus was not distressed, although hours later in the garden of Gethsemane Jesus "began to experience sorrow and distress" (see Mt 26:37). Yet, in the presence of His betrayer, Jesus was calmly in control of the situation.
Jesus does things to instruct His disciples, and also us. He's trying to teach them, and Judas, how we should respond in the presence of our enemies, and that the appropriate response is mercy. Jesus reaches out to Judas with an offer of friendship in the morsel. Jesus is giving Judas no room to deceive himself in his decision to betray Jesus by giving Judas a final chance to repent.
Jesus, by announcing that His betrayer is at hand, forces Judas to realize that Jesus is still divine, still all-knowing, and still reaching out to Him in mercy. Yet He knows that Judas will refuse His final offer to repent.
How can Jesus be calm in such a distressful situation? Jesus knows the Source of His peace. He can remain calm in the presence of a betrayer who will hand Him over to death because of His firm relationship with His Father.
Likewise, we disciples can be calm "in the sight of [our] foes" (Ps 23:5) if we are united with the Father, Who makes all things work together for the good for those who love Him (Rm 8:28).