I agree that you should probably ask your husband to hide the gun for now. That's just way too dangerous given how you're feeling. Personally, there have been times where I've thought to myself that if I had an easy way at that moment to just end it, I would. But I don't and end up just waiting for the bad feelings to go away.
I'm not sure why you think your husband is going to leave you, I'm sure that's not the case but maybe you should talk to him and be open about how your feeling and your concerns. And your daughter definitely needs you and needs you alive. If you were to take your own life it would definitely mess her up and I'm sure you don't want that. If you don't do it for yourself, do it for her. Please be safe.