Relationship with husband and kids

How to decide whether I should leave my husband or I should put more energy into repairing the relationship?
I feel constant hate, anger, frustration and I yell so much these days, I am at my worst. I hate seeing that the kids experience this as well.

I know I have so many negative thoughts about him, but I can’t think of anything positive which I would truly believe.
I don’t find him attractive anymore. I don’t like being around him. He is emotionally abusing me every day.
He is a fine dad though. He should spend more time with the kids (manual) but when he is with them, he really is OK, making them laugh.
For me I would go for separation, for the kids I feel I should stay.
How to decide when my thoughts are so negative?
Thank you