Bipolar husband

I’m new to Bipolar and was hoping to get some advice on how to handle when my husband is in an episode with it. He just got on medication a week ago. He becomes extremely distant to myself and our daughters so it’s hard to see and it makes me angry with him. He also does a lot of shitty things like talking to other women for one, it’s reoccurring every 8-9 months he will be the most amazing person you’ve ever met then for a month or 2 totally opposite. I know it’s the illness but idk what to allow or leave him for!? Hopefully this makes sense to someone and I can get some advice thank you!