Worst nightmare

My worst nightmare is suicidal thoughts and I have been having one lately my cousin had same we got to know when it was late, does it mean it’s a family thing,what should I do?