When he sits at the piano, Niles plays a rather melancholy version of "Where, Oh Where Has My Little Dog Gone?"
The guest caller was Patty Duke, whose call was about dealing with depression. This guest spot may have been planned, as Patty Duke suffered from congenital bipolar disorder, which involved serious bouts of depression. She was the public face of the condition and was an outspoken advocate of care for the mentally ill.
After Dr. Shaw has had his private time with Eddie, he brings him back into the living room and says he has a diagnosis, to which Frasier responds, "Finally: the white smoke!" This is a reference to the white smoke emitted from the chimney atop the Sistine Chapel at the Vatican when a new pope has been elected.