My mother has manic depression, I've been aware of it since I was 8 or so. In my case it has hugely impacted our relationship, very much for the worse, but there are major reasons why and I believe they could have been resolved with the right management.
If you are trying to do something about it and keep going, that is all that matters.
It doesn't mean you have to be constantly cheerful, fully functioning or even get out of bed on bad days (practicalities of caring for small children notwithstanding). If you are covering the basics of care and emotional needs of your children and try your best each day - do that and you won't go far wrong.
I've seen my mother be in bed for weeks on end, doing the bare minimum of housework and not going to work, but we had food, a house and clean clothes so I was happy enough.
Things that were neglected were my personal care, so I didn't brush my teeth properly or at all for months at a time as a pre-teen so now I've had a lot of dental work done - that i am disappointed with as I wish I'd had more attention to be made to do that as it has such a lifelong impact to daily health.
Another issue is that she did take medication for the first few years, but then would stop for periods and decide she was 'cured' - letting loose a manic depressive with no self regulation or responsibility on things like not paying household bills and going on spending sprees on credit cards so debt built up wasn't great.
The manic side meant she has done a lot of unpredictable things, as a child growing up I thought she was being 'fun' but looking back I see the mania behind the behaviour. There is also a lot of destruction, with grand plans and intent on doing this or that started, but then not followed through or only half done or planned badly, with unfortunate endings on more than one occasion despite me or others trying to rescue the situation.
I am currently no contact with her as an adult because I have no time for someone who takes no responsibility for their actions. As she's grown older the irrational behaviour has got worse and worse, with no management by medication so after trying many times to help her, forgiving her and starting again over and over I have recognised the cycle and given up.
Don't do what I've described above, try your best for your children no matter how small the effort, tell them you love them and keep going. They will see and appreciate what you are able to do and know you are doing your best.