Welcome to the forums and thanks for reaching out.
It sounds like you have a lot of insight into what's going on for you and how your emotions have affected you and I think that's something to be proud of as not everyone has a lot of insight into their condition. Knowing more about depression and how it affects you and the mind-traps that it gets you in can help gain perspective and clarity - especially in relationships.
Wanting to be in a relationship because we hate being alone is not a good reason to be in one, because it means we'll always be looking for that 'fulfilment' - which unfortunately, nobody can bring because we have to create it in ourselves. There's a difference between being alone and being lonely though; so figuring out what you don't like about (or don't know how to) being alone can help. Is it fear? Shame?
As for dealing with depression in relationships though - that does take a lot of work. Again, this is where the insight helps - learning about what you need and what helps if you start to feel the black dog creeping in, or knowing how to have conversations when you need reassurance or support, or being confident enough to reach out for more help when you need to. For me personally whenever I got into a relationship I would be afraid that I would be rejected and unloved, so learning that I had that fear and shame helped me to address it head on. Of course - having a partner that respects you is key - because depression is not your identity and if they care about you they'll support you and work with you.
Maybe if you're not quite ready for a relationship, maybe start with finding and growing your friendships? It's not as easy as it sounds - but having friendships without the commitment of a relationship can often give you a good heads-up on when you feel 'ready' to start again.