First, tell someone close to you rather than keeping suicidal thoughts to yourself. You may be reluctant to "burden" a loved one, but people who are suicidal and share their feelings with others are much less likely to go through with it. The real "burden" comes from committing suicide and leaving loved ones feeling guilty that they didn't do enough to prevent it.
If you're not comfortable telling a friend or relative, call your doctor or a suicide hotline immediately. The National Suicide Prevention Lifeline is (800) 273-8255. Most local communities also have suicide hotlines.
Or, go to the emergency room or call 911.
Suicidal thoughts should never be taken lightly, so the most important thing you can do is to not ignore them or assume you're having a passing feeling. It's critical that you tell someone in order to make yourself safe and get on a path to receiving help.
What you ultimately want, fast, is a referral to a mental health professional who has experience assessing and treating people who feel suicidal. Thoughts of killing yourself are among the few mental health symptoms that require immediate professional help. Suicide is a permanent choice to deal with a temporary problem that can be treated.
With proper help, a person with thoughts of suicide will learn how to stay safe as their hopelessness and mood improve.