What if I have been preparing for my death?
That's not good. Why have you been thinking about your death?
I dream about it a lot, I sometimes feel like no one needs me.
You're a human with feelings and beliefs, and you should just be yourself. You shouldn't want to die just because you feel like no one needs you, and instead you should try making connections with other people so that you do get that feeling of need that you want so badly.
I think it is because I can't make any connections.
Making connections is hard and you should seek help to learn how make connections in life. And you should also seek help to manage other things in your life rather than wanting to die.