she's decided to leave me placing a lot of blame on me... .
Blaming and Blame Shifting are common behaviors of people with BPD (pwBPD), it's a facet of the extreme Denial of their issues. Reasonably normal people are able to honestly say, we both have issues and both contributed to the relationship issues. Acting-out pwBPD will almost never make such an honest admission to evaluators or the courts, their denial and blame shifting kick in.
Within days of telling me she wanted to be out of the marriage she started dating a guy that she had been dating while he was married and getting divorced five years ago.
It is common for pwBPD to reject one relationship and quickly jump into another relationship. It's a reflection of their neediness. BPD is centered around a fear of abandonment but then they will often end the relationship so they can do the abandoning rather than face being abandoned. (Yes, doesn't make much sense but we shouldn't expect mental illness to make sense.) But often they have someone simmering on the back burner so they won't be alone for too long.
I trusted my wife is a smart enough woman that she's a good mother but I'm worried about her decision-making... .
I don't think my wife is totally psychotic and maybe fully bipolar too but I do think there is some confusion that is caused by me I became very codependent in this relationship I lost myself I'm very confused I don't know whether to trust her or not I don't know whether she's going to be a good mom and protect my daughter from her or trust her and know that my daughter will be OK and I don't know what to do.
Beware of saying she's a "good" mother. Stating she is a good mother and yet you are concerned about her parenting is inconsistent. If you continue saying she is a good mother then your concerns will be discounted, so choose other phrases, challenged, troubled, inconsistent, etc. She is emotionally erratic, unstable and inconsistent. Yes, she can feed a baby, change the diapers, etc. Many pwBPD can do okay when children are totally dependent on them. But when the children grow older and want an age-appropriate, increasing independence and validation, they hold the children back and stunt their development.
Frankly, you should find ways to clean up your life. No drinking and driving - none! One DUI a while back, you can state it was a one-time event and not a reflection of your regular lifestyle. But you have to live it, making a false claim risks the truth coming out and impacting your credibility. Same with the recreational or 'coping' drug use. Phase it out ASAP. Instead, seek
meaningful counseling to address your stresses, weaknesses, relationship issues, etc. Yes, it will not be easy to face this challenge but your personal life, your child's welfare and your parenting are at stake.
I can't take full custody and don't see a need yet. but with her physical and mental abuse I am worried about her long term ability to be in control of herself.
You are right to be concerned about her stability as a parent. However, courts are generally reluctant to order full custody to one parent unless there is real basis. Yes, they can grant TEMP custody to one parent in the initial TEMP order but that is just their quick method to stabilize things for the divorce process. (My ex and I separated when I called 911 and she was eventually arrested for making DV threats. When she got out and went to family court, she succeeded in getting temp custody. Court didn't give any weight about her
adult (mis)behaviors against me, it didn't see that as impacting her
parenting behaviors and just defaulted to her in the temp order.)
Be aware that you need to get the best initial temp order that you can get. There's a saying, Temp orders are likely to morph into final decrees.