Personally, I would wave down a nurse, or receptionist, and scribble them a note to inform my patient in the exam room that I have an emergency.
Then, I would ask the patient on the phone how he came to the decision/whether there have been any recent events leading to his mental state. If it has been a single event, try to help them see the context of the event and to look past it.
A part of it also depends on how much you know about your patient. Whether they have supportive family, friends, etc. Try to remind them of things that make life worth living: loved ones, pets, hobbies, etc.
Tell them to reconsider and wait a few days to see if they change their mind. Once you believe they are not going to commit suicide right away, offer to put them in contact with a trusted psychologist/counselor. If they agree, get a nurse to book you an appointment on the spot! Agreeing to do something in the future will help prevent them from committing suicide after they hang up with you. Tell them that you are here for them if they need to talk again.
Lastly, I think this is a situation where you cannot promise confidentiality. In fact, I think it's your duty to make sure that your patient gets counseling. If they called you, they obviously trust you and are seeking your help.
Go to this website. There are a few good tips on how to relate, how to indentify, and help suicidal persons:
http://www.couns.uiuc.edu/Brochures/suiprev.htm
Hope this helps!
BananaSplit