I am bipolar with borderline and ptsd. How can I get out of a relationship that makes me suicidal if my boyfriend is too sick to care for himself?

Ptsd. Need a therapist with experience in dialectical behavior therapy to help u with boundaries issues and healthy separation.
See your therapist! . Relationships truly can be challenging for most people and so deciding on when or how to get out of a relationship is very personal. However, you need to share your self harm thoughts with your therapist and/psychiatrist asap. They most likely know your history and would be able to assist you the best.
Take care of U self. Being bipolar, borderline and ptsd is not easy and it require u to be taking medication on ongoing basis, refraining from illicit drug use, seeing a therapist and avoiding stress. If u can't take care of u self u can't help others. If someone is too sick to take care of himself , may require assistant living facility.
Suicidal. If you are suicidal for any reason, then you (not just your boyfriend) need help. Your info lists no medications or therapy for bipolar, borderline, or ptsd conditions, so you may not be in treatment at all. You need to be in treatment yourself, and can get this with a psychiatrist and very probably a psychologist also. If suicidal, go to er now. Over time, therapy can help w/bf issues.
How. With the support of family & friends. With good self-care. With input & assistance from your therapist. With courage. By making your health & wellness a priority.