Suicides and attempted suicides are the consequence of a deep feeling of hopelessness. Even though you seem to have reached a dead end, help is always available.
Talk to someone about your ideation, even though it is difficult. If you do not want to talk to a professional, contact a friend or a loved one.
If your loved one talks about their desire to die, show them that you care by listening to them and asking how they are doing. Do not be afraid to directly ask them about their death wish and suicidal plans. Encourage them to seek help or seek help together.