Matthew Morrison is keeping Cory Monteith close to his heart. During his encore engagement of Up Close and Personal with Matthew Morrison at 54 Below in New York City on Sunday, July 14, a source tells Us Weekly exclusively that the singer/actor dedicated a song to Monteith, his Glee costar and close friend, who passed away on Saturday, July 13.

"Matt came out before the show started and said, 'We lost a great young man too soon,'" the source explains. "He said Cory was a beautiful person." Then he told the crowd, "You came out to see a show, I came out to do one, so let's honor Cory with this performance."

Morrison, 34, chose the tune "What I Did for Love" from the Broadway classic A Chorus Line to dedicate to Monteith and struggled to contain his emotions during the performance. "He was very emotional on stage," the source tells Us. "It was difficult for him to get up to perform, but he did not want to disappoint anyone."

The song has a special meaning to the Glee cast, as Monteith's girlfriend, Lea Michele's character on the show, Rachel Berry, performed the ballad during the season two premiere in 2010. (Lyrics include "Love is never gone/As we travel on/Love's what we'll remember/Kiss today goodbye/And point me toward tomorrow/We did what we had to do/Won't forget, can't regret/What I did for love.")

Morrison, who plays Mr. Shuester on the FOX series, worked with Monteith since the show's inception in 2009. Since hearing the news of the actor's tragic death, an insider tells Us Weekly that the singer is distraught over the loss.

"Matt is beside himself," the source explains.

Michele, 26, Monteith's girlfriend of one year, declined to comment following the tragedy. Her rep told Us in a statement, "We ask that everyone kindly respect Lea's privacy during this devastating time."

Monteith, a Canada native, was visiting his mom in the Vancouver area at the time of his death. On July 13, police announced during a press conference that the actor was pronounced dead on the scene in his hotel room at the Fairmont Pacific Rim Hotel in Vancouver. Foul play is not suspected and a autopsy will be done on Monday, July 15.

"We are so saddened to confirm that the reports on the death of Cory Monteith are accurate," the actor's rep said in a statement to Us. "We are in shock and mourning this tragic loss."