Hello Familyman,
In my opinion, I would definately protect my daughter 1st (she's not getting proper care if she is not getting her medicine) and then I would need to protect myself financially from a spouse that is spending money irrationally. You need to speak to a lawyer to get custody of your daughter and to protect yourself.
Your wife needs serious help. Since she is in a place where she cannot see it or give any attention to realize it for herself, YOU need to take matters into your own hands until SHE is ready to accept that she needs help. Unforturnately, things are probably going to get even a lot more ugly until until that happens. That is why YOU need to be the logical adult here for You & Your Daughter.
Your wife obviously doesn't understand,(and this type of behavior is very common with bi-polars that have not seen a doctor in a long time and are unmedicated/on the wrong meds), but a lawyer will understand and will be able to get all of this straightened out for you in the meantime.
Listen to the advise you have been given from others too around here. Many have gone through very similar situations as yourself and know what they are talking about.
Please keep us posted and let us know what happens when you meet with a lawyer.
Sincerely,