Good for you for telling your husband how your feeling and how these thoughts are invading and your concerned. I deal with suicidal thinking very often, its just my particular version of Bipolar
Working with my T we have come up with a safety plan. Its a list of questions and reminders to use mindfulness and self grounding. If I can't work down the list and have a feeling of being okay then .. I talk to my husband about how I am feeling, just talking to another person is usually enough that I am able to take a step back and regroup, If I still am in the " unknown" I call my T. If I just can't step away from the thoughts and stay safe I will and have gone IP.
A couple times I really felt like I was okay and safe, My husband and T disagreed.. I trust them both so if one or the other feels I am not okay I usually go by what they think.
It's a thin line to walk.. Try and put as many hurdles as possible between you thinking and deciding how and making a plan...
Stay safe