Loss is always painful. That you only have/had one friend means it is even more difficult for you. Why the other person ends a friendship is not important; he could be blaming it on his wife when it is he who is uncomfortable -- I do that all the time. The wife was not in the relationship. Too, what you told your friend has nothing to do with anything. That it was or was not your deep dark secrets is up to you and what you wish to tell another. They and their telling are yours and only have meaning to you.
It sounds to me like you need to learn to make friends, not just online, and you need to spend more attention on your own marriage. I cannot imagine telling my deep dark secrets to a friend of the opposite sex that is not my husband or therapist nor can I imagine not telling my husband my deep dark secrets. But, mostly, I don't really have any deep dark secrets; I don't believe there are such things, all of us are human and have a full range of human abilities, thoughts, feelings, experiences, etc. There are no secrets.
I was in group therapy once when the therapist gave us each a present. It was a plastic pile of poop

gag gift to remind us that all our poop smells alike, that there is no "special" poop.