I cheated on my first wife for this very reason. I had never felt so alone in my life.
The affair showed me that life could be good again. It gave me the impetus to move out and divorce my ex.
I am not proud of cheating but I am not ashamed of it either. It was what I needed to do.