As others have mentioned, this is an unfortunate situation and I hope you're doing well now. Your health and well being remain the number one priority.
No one can tell you exactly how this will play out. But I think it's worth thinking about it from a few different angles: legal, academic due process, disability, and social (I'm trying to come up with a better term, this is the best I've got).
Legal issues are complicated because they are very locale oriented -- what's "true" in one jurisdiction may bot be elsewhere. In general, the law protects those with known disabilities and acute illnesses. If you have a known disability you can ask for reasonable accommodations, and assuming that your school finds them reasonable and does not alter their minimum standards they should meet them. This will protect you going forwards, but rarely can you claim disability in retrospect. When you're acutely ill like this, laws can protect your ability to take a medical LOA. However mental health issues are extremely complicated -- as the illness itself usually entails a lack of insight by the patient. Hence you ended up with unprofessional behavior, and no way to extricate yourself from the situation before things escalated. A don't know how much a lawyer can help you at this stage -- if you want to contact one for personal advice, fine. But I would not get them entangled with your school -- that's sure to come across as defensive and that's not a good look for this problem.
Academic due process is going to be your next big hurdle. Your best option IMHO is to be completely honest about the situation - lack of prior episodes, lack of insight while your behavior unraveled, embarrassment and remorse for what happened, and a willingness to make amends. I agree with
@Goro's recommendation above to read your student handbook in full and know the process. Whom reviews this, what options do they have, what appeals do you have, what outcomes can you expect. Keep track of whether your school does everything they are supposed to. Don't tell them if they do not -- it becomes a very useful lever if you ultimately lose and they try to dismiss you. The legal system will rarely overturn a profession's well reasoned decision to expel a student But it has no mercy when a school doesn't follow its own written protocol.
Part of academic due process is Title IX, which you mentioned in your post. This unfortunately makes this into a bigger issue that may spiral out of control. This means that your behavior resulted in someone feeling uncomfortable due to gender -- unwanted sexual advances, banter with innuendo, or something along those lines. There is an entirely separate process for addressing Title IX issues, with a separate group of evaluators. Title IX is a huge deal because if someone complains to the Feds that their complaint wasn't taken seriously, the school can lose all federal funding. So schools have a tendency to believe the accuser/victim, and punish the other party. This should also be in your handbook, and will have a completely different process. You will go through both separately, and need to "pass" both reviews to continue.
Regarding disability, as mentioned above this mostly applies moving forward. Remember that disabilities do not "explain away" poor performance. You are expected to ask for accommodations as needed to maintain adequate performance. If you were to have another episode like this, no amount of explaining that it was out of your control would suffice.
Last, social issues. You should probably assume that your story has spread through your school. I'd hope for privacy, but I'm sure your behaviors were relatively public, and people talk. Assuming you're allowed to restart, you'll need to work with these people again and you'll need to be prepared for how you want to address it. You can ignore it and just pretend nothing happened. Or you can be open with people whom you work closely with that they "may have heard stories" and try to clear the air. Neither solution is perfect, you'll need to pick what you want to do. And different environments may need different solutions.
As you go into your reviews, you should also consider what you think a good next step would be. They will likely ask you -- as a way of assessing your introspection. How long should you be stable on meds before you're allowed back in? Should you repeat the entire MS3 starting next year, including clerkships you passed? If you were to return to the same OB site, how would you navigate that? These are all questions to which you should have answers -- and understand that asking for too much too quickly will not be held in your favor.
So, in summary:
Number one priority is getting better. Your school is probably going to want to see a sizable period of stability on medications, could be up to 6 months. Trying to get back in "right away" so you can graduate as quickly as possible is not going to support your assertion that you understand the gravity of the situation.
A lawyer is probably most helpful in navigating the Title IX issues. That's the type of lawyer I'd work with, if you're going to hire one at all. They do not come with you to any hearings, and you don't mention that you have a lawyer to anyone.
Know your academic due process backwards and forwards, same with Title IX. Keep notes on everything - every meeting, whom was there, etc. Make sure that keeping notes is allowed (although it usually should be). Never record anything unless you're certain you have permission, which is very unlikely.
Try to find some local supports / mentors. This is going to be a tough process, you want someone to lean on. These people should be outside the due process envelope. They are not coming to your meetings to support you -- they are there for between meetings and decisions for personal and moral support.
Assuming you are allowed to resume training, consider how that's going to happen and how little/much of this you are willing to share with others, understanding that both over and undersharing can have consequences.
Also, you need a canary. These were bird that coal miners took into the mine shafts to warn them when the air was bad. Sadly, the canaries did that by dying. In your case, you need someone you trust that's close to you to watch your behavior. They are empowered to tell you is you're starting to show manic behavior. And you MUST listen to them. Even if you're certain they are wrong. Because you can't see it. This is really hard, but it's what you need in the short term.