This will sound really harsh, but it's not.
Until you grow up enough to get out of the pity-party habit, you should definitely not have children.
Until you have realized that you have value yourself without having someone else give you that value, you shouldn't be in a relationship and you definitely shouldn't have kids.
Until you can figure out that you are okay on your own, even if you're lonely, you're no good to anyone else in a healthy relationship. You're absolutely not ready to have kids.
You need to find yourself first, before you attempt to forge a bond with someone else or have children. Unless you know who you are AND are comfortable with who that is and what it means to be you, the examples you will set for your kids are unhealthy.
No one online or in your offline life can fix this situation for you. If you need counsel, seek it and pay attention. Just find a good quality counselor and not someone who's going to let you get away with the crap you've been trying to convince yourself is real. Find someone who is going to make you be real.
After that, you'll find it is much easier to not be lonely, and you will also learn that having kids to cure the loneliness is not the answer.
I wish you well on your journey.