Scruffleshuffle it may also be that you will feel in a better position to sort things out with your dh as your friendships grow. It does take time to form friendships and often we have to just have regular small contacts with people and grow it gradually. I found my way out of loneliness by just making a point of talking to people and exchanging remarks on a regular basis. There were no immediate kindred spirits (but one did become a very close friend despite our differences) but just regularly having little positive experiences of people who clearly thought I was a pleasant person built my confidence and made me feel less isolated.
I found Meetup excellent for finding groups of people and that's how I built most of my social circle. I had to be really firm and fight for my right to go out, and I found it helped that these groups often meet weekly or monthly so I could negotiate to have fixed times set aside for me. You have to believe in yourself that you need and deserve it. Before that it was always DH that went out and had time to himself away, but once I had definite groups and times it was easier to stand my ground about it.
I was fortunate in that I bonded with people when I started to explore my spiritual beliefs. I had to put aside the fact that many of them had a rather different take on it than I did but nevertheless by virtue of what we were discussing it built intimacy and I now have many very good friends I found that way. My mum is Christian and has a great social life she built through Bible groups and church. It doesn't have to be "religious" though, atheism is spiritual too and many of my friends are firm atheists. It's more about a shared interest in certain big questions in life, really.
There are also others that I only see when I get to groups based around my interests, and we also only talk about that, but the affection and appreciation is genuine nonetheless, and I come away having laughed loads and feeling like a valued member of the group.
I joined a support group for post-natal depression and though I've sadly lost touch with the people in it now I'll never forget how that intimacy and comfort helped me.
Many people here have more negative experiences of Facebook but it was a game-changer for me. I reconnected with old friends and found a little community of disparate people who shared my sense of humour and love of nature. Some of them I've only met once in person, still we regularly enjoy commenting on each other's posts. Others have turned into offline friends as we have met up for coffee. I find to get the best out of FB just ignore the negative and focus on the bits you connect with. It draws more of the same to you. (Literally, with FB's interfering algorithms! and you do have to watch out for their insensitive ads and dodgy suggested posts...)
Sometimes it is as simple as having the courage to show other people that you care about them and are interested in them when you know they are going through a hard time. Often we care but don't show it, so if you pluck up the courage to enquire after someone or do some small helpful act that can build trust between you, or you can give sincere congratulations and compliments. When we are lonely sometimes we withdraw into ourselves because we are scared of rejection, but if we show our caring for others in a small way then that strengthens the connection. I couldn't manage ongoing voluntary work but it helped to step up and volunteer for one-offs as well.
I don't think it is so much that you are too needy, because we are all needy when we are lonely. If you had to not be needy none of us would ever find our way out of loneliness. What you do have to be is patient and not take things personally when people are more occupied with their own stuff than with you and they don't reply or invite you to things. Spread your net wide and keep on making those positive contacts, enjoy a variety of different contacts with people and in time genuine friendships will blossom. Remember, how other people treat you is more about them than you, unless you are really being an arsehole or totally self-centred which I am sure you wouldn't be.
With my friends around me I was better able to tackle the toxic way my dh was treating me and he is now my exdh. The irony being that he is now one of my best friends as I started calling him on his crap and he's now found someone else. He's a much better ex than he was a husband.
Oh, and I love Springy's quote!!
best of luck, scruffleshuffle, have faith in yourself, you will get there in time :)