What do they do when you are feeling suicidal?

Talk to you. The doctor will talk to you to see how bad you are feeling and if there is any other reason besides depression that could cause you to feel that way. They will see if you are safe to go home or need to be admitted to the hospital so you can continue to talk to a counsellor and maybe even start medicine.