Hello, Ameya. It sounds like you are in a difficult emotional situation. I can understand why it can be hard to reconcile wanting that attachment with not seeing a future for yourself. The two ideas do not seem very compatible at first glance. You are also probably right about the effect your own suicide could potentially have on him, and the same holds true for how his could affect you. That being said, there is an idea that I think might be worth considering, and it is this:
You are allowed to take up space in this world.
It is true that what you do or don't do will affect the people around you, the same holds true for everyone else. We do not, and cannot, live in a vacuum. We all have impacts on the people around us, and are impacted by them in turn. That's just part of the deal when you're a social species. With that in mind, each of us has to be allowed to take up space, to have and to pursue our own needs. And yes, we do need to consider how those needs may impact those around us, but not to the extent that we deny ourselves anything and everything just to protect everyone from potential harm. Nobody can live like that, and you don't deserve to, regardless of how long you actually intend to keep living for.
Furthermore, it seems to me that the two of you are actually in a pretty good position. You're suicidal, he's suicidal. You're both being honest with each other, you're not leading one another on. This kind of openness is so important in a meaningful relationship, and it's a healthy thing that the two of you have it. I wouldn't discount that.
And lastly, there's the issue of agency and trust. Part of really caring about and trusting a person is allowing them their own agency. That means letting them make their own choices. And yes, you have a choice too. And if it's your choice that you no longer wish to be in this relationship, for your own reasons, then that is the choice that you should make. But you should also understand that your partner knows the risks. He is fully aware that you are suicidal. He knows that he could lose you, in spite of the future that he sees. And he seems to have made the decision that it's worth it. You're worth it. You don't have to be able to see that future, but the decision of what he's willing to risk and who he's willing to risk it on is his to make.
Is it worth it to you? Knowing the risk of potentially losing him, and what that would do to you, is that something that you're willing to risk in order to have him in your life right now? I can't make that call for you, but from what you've said, it seems to be. So wherever you're at right now, whatever future you don't see, if there's someone in your life that makes things just a little bit better, and gives you cause to even entertain the idea that something good might come out of it, hold on. You've suffered enough, and you've a right to one of the few things that bring you some measure of comfort. Don't let fear of what comes next convince you that you have to give it up.