Make yourself available to them. Seek support from others. Don't promise to keep it a secret. American Association of Suicidology has detailed information about how you can help. As many as one in six people may become seriously suicidal at some point in their lives.
Suicidal crises are almost always temporary.
Problems can be solved and the crisis can pass. Help IS available. Even if you don't see a solution, that doesn't mean there isn't one. There are others who can help you find a solution to what is troubling you. American Association of Suicidology has helpful information for you.