You have gone through some turmoil. Everyone does. I have been quite lucky in that regards since my life has been pretty easy going. Some people are just dealt a different deck of cards that are beyond their control. I accept that there are bad days and good days ahead for me.
I believe the best thing to understand is that pessimism invites more turmoil, whereas opptimism causes good to flourish. I started watching the documentary movie called "The Secret" and they kept repeating this same idea before I turned it off after 20 minutes. It seemed a pretty basic idea that I think all should live by.
You are 40 years old and have a wonderful life ahead. The words you write are of someone that is in pain, but also someone who has a deep emotional desire to relieve the pain. You know what causes it. You are not crazy. You just desired what most of us wanted who write on these forums - a loving beautiful intact family.
Trust me and others - your happiness and fullfillment will return, and with time, you may again share it with someone.