At the point where you realize what you are dealing with; either (as suggested above) get out of the relationship ASAP or (could be said, if you truly love them), try to understand that the person you are dealing with has a severe mental disorder, help them get help and support them as they go through this hellish nightmare.

But then again... if they are unwilling to help themselves, there's not much you can do.