Thanks for your query..
Suicidal thoughts donot just crop up,you have to be thinking passively about it for a long time...
Try to talk to a close friend and if you dont feel right,you must talk to a neurologist/psychiatrist and relieve your complete thoughts,its called thought purging..will clean you completely and help gain confidence.
If you follow some faith you can take their help..
take care...