Please ensure that the child is well taken care of before you choose to do this.
I'm going to give you my background. It's probably going to seem irrelevant to you, but make of it what you will.
My father immolated himself when I was six. It has permanently scarred me and left me as a mental, emotional, and social-psychological invalid; while that wasn't the only reason, it was by far the biggest contributing factor, all else considering. While you'd be hanging yourself, and your child is much younger than I was, the possible effect is the same. Everyone I know who lost a parent to suicide is deeply and irrevocably wounded in some pretty serious ways.
If you're going to do it - and there are still certainly scenarios in which I would consider it justified despite the circumstances - you have an obligation to ensure to your own fullest possible satisfaction that the child's needs will be met to some degree after your passing.
I think, too, that if you're going to do it you need to do it before you fully imprint on the child's conscious mind. This might conflict with the first imperative - after all, you cannot possibly ensure that your child's needs are going to be well-met if you CTB in the next several months. And yet, at eighteen months, she's close to the age where you will imprint permanently on her, where she will have clear memories of you subject to immediate recall well into adulthood.
The most damaging thing in the world - morally, spiritually, intellectually, emotionally - for your child would be to be four or five and seeing Mommy taken away in an ambulance. You have to figure this out now. If you're going to CTB, focus absolutely all of your waking effort and energy on ensuring her needs can be taken care of in whatever way suits you best, and then do it. Live intentionally, every moment, until that point, to guarantee her well-being. Not only for her sake, but for the sake of everyone around her in the future as well.
If you have stable siblings, reach out to them and imply your intent; "what will happen to her if something happens to me?". If you have supportive parents, talk, in a roundabout way, with them about her future. And talk t your husband about it every day. Best cast scenario, you choose to live and it develops along healthy lines for all involved. Worse case scenario, you do CTB, but she has plenty of love available and she can endure.
Another thing you might think of doing, and something I would have greatly appreciated, would be to write a letter that you somehow ensure gets to her at a certain age. Again, perhaps this isn't possible given your circumstances, or perhaps you do not think it is. But I bet it would be. I would, if I could, write her a letter filled to the brim with love, and trying to explain why you felt you did what you had to do. Ensure that she knows you love her and loved her all the same.
I don't consider it evil to consider CTBing even with a child, or even irresponsible. But it depends on how it is done. And you have to do it responsibly - if you can't live for your daughter, die in the right way for her.
peave to you.