OP, I’ve seen many people turn around after aged 40, including a friend who got married for the first time at aged 58. She’s energetic and attractive and incidentally also turned her life around after 40.
My two pennies would suggest you throw the past expectations out the window, determine where your passions lie, and set short-term intentions / goals. I might also suggest looking to groups where people are successful but take approaches outside the norm. My friend for example is a successful physician and involved in a Yoga community that is global and inexpensive and where he can meet others of like kind. Build community for yourself.