my boyfriend has BPD and the following problems have more than once lead me to think that the relationship maybe is beyond saving.
How do you know he has BPD? I am talking from a guy perspective and my dealings with my uBPDw (undiagnosed borderline wife), had I known at the time, would have probably led me to do something similar to what your boyfriend is doing to you now. So, I am going to play 'devil's advocate' here for the guy's point of view...
We've been together for 6 months now and the first 3 of them were amazing. But since I decided to take care of my own severe mental health problems by planning to stay at an institution for a few months,
our arguments seem to build up in intensity. He feels left alone and like I shouldn't have decided on my own to go away for such a lomg time, even though I think that I talked to him about it beforehand sufficiently. In the end it is my own problem and I am sure that going to the institution is the only way to solve it.
After I made the decision (mind you, I have been waiting for a free room at the institution for roughly 6 weeks now), he kept telling me over and over again how he cannot handle it. In his eyes it was the end of the world and he wouldnt know what to do with all of the time on his hands. And I was the worst person to do that to him.
My relationship had 5 wonderful years followed by 17 years of increasing misery (I have been married 19-1/2 years). You have indicated that you have your own "severe mental health problems" that requires institutional care... I am very very proud of you for getting

and you are doing what is best for you -- that is AMAZING

. However, based on what you have described, for most guys that is a huge RED FLAG

especially for a relationship that is only 6 months old.
The thing is, I really made it worse after that because the only solution to his outbursts and his insults seemed to be for me to break up with him.
Even though this seems like an oxymoron. The mere fact that he IS lashing out at you indicates that he deeply cares for you, if he didn't care he may very well have ghosted you by now (I've personally ghosted a previous g/f who cheated on me twice who had mental issues, as her issues were too much for me to deal with). I feel that you are presenting him with some really difficult emotional issues that he probably cannot really deal with and the easy way for him, is to get you to "break up with him" so he isn't the "bad" person for the breakup -- based on your honest description of the situation I would have very likely done something similar if I were in your boyfriend's shoes.
I sat down with him and explained to him that I am at a bad place myself right now and that I cannot have anyone in my life who wont support me in the good things I do for myself. But he told me to think about it, we took a one week break and then he didn't talk about this problem to me anymore.
He isn't talking about "it", as he doesn't want to confront "it" [the issue], and he probably
doesn't know how to. Telling you to think about it, is a good thing as you need to evaluate what is best for you. Keep in mind 6 months is still a very new relationship -- I know if my wife would have dumped her issues on me prior to being married at the 6 month point -- there is a good chance there would not have been a marriage. She kept it hidden until two weeks after the honeymoon was completed, as she knew about the other relationship that I mentioned and was too scared that I wouldn't marry her if she did otherwise based on what she told me when I arrived at the wedding venue to get married. And even then she slowly exposed her issues of the period of the next several years until it became too much.
Did you think of him as the perfect man for the first 3 months, or was it the reverse, or was it mutual? The simple fact that he is still there shows you that he is very much into you -- he probably didn't know how to deal with your issues, and probably still doesn't (it took me over two decades to even recognize the issue, and I still really haven't figured it out, and I and the children are having a tough time of it). If he hasn't already done so, encourage him to get an individual counselor for himself, and also a couple's counselor for both of you - it is a one or two hour commitment per week. Since you are being institutionalized (a 24/7 commitment), I am quite sure the institution has a plethora of resources that can assist you and him in this matter -- leverage this resource to your advantage.
Still I know that something's very off between us, because every little mistake I make is punished very hard by him. What should I do? He wont take care of himself the way I take care of myself right now. So maybe we will be too far apart in terms of mental health and what we want from life when I come back, but I really cannot know.
What are the mistakes you are making against him? And, how is he punishing you? The fact that he is lashing out at you, indicates that he cares (in a dysfunctional kind of way).
What should you do... wait for the punishment to end and he is no longer in a bad mood, wait at least 10 additional minutes (or more, sleep on it if it severe) and then tell him how it made you feel without making any accusations at him using "I" pronouns without being accusatory -- you have the right to stick up for yourself and tell him how it made you feel. Keeping in mind If it is a minor infraction you did, and he blows it all out of proportion that is one of over two hundred traits of the BPD. The following are not traits of the BPD (the reason why it is the very first thing I asked)... However, if it is a major infraction, and he returns it at a similar level, that is called reactive abuse. However, if it is a major infraction, and he eventually lashes back out at you with just enough emphasis to stop the perceived attack (this is what I do with my wife if her non-stop rages lasting for a few hours, I eventually snap back, and yell back for a minute or two until it stops -- this is how I lash out at my wife). In any event, this is something that you need to discuss in a therapy session with or without him with a Therapist.
Hopefully, I have given you a better understanding or insight of the dynamic that you shared with us, I have given my perspective from what I perceive to be from the 'guy' side of this mental health issue. I know it is a huge step for you to share this with us, and I hope and pray that you can have some empathy for what he might be going through too.
If you want to salvage the relationship with the guy (as he sounds like a 'keeper'), resist the urge to dump your problems on him (even though this is 'logical' share your deepest secrets with him) but redirect your dumping to a therapist -- that is what they are paid for. Remind him of the good times in the first 3 months by your actions (do the same thing now as you did then), and if it is meant to be he will be there for you.
Once again, I think you are doing an AWESOME job, by admitting yourself, and getting the HELP that you NEED for YOU! I wish you the best of luck and pray for you on your journey, as it sounds like you have a good head on your shoulders and are doing the right thing. Take care of yourself.