I read your comment saying that you work remotely. I have been doing that for 2 years too and honestly until recently I felt the same way as you.
I started fixing myself by doing meditation and exercising regularly. I have made my mental and physical health my top priority.
Once I established that I made sure that everyday I am learning something new and challenging and creating something.
After that was taken care of I decided that every week I am going to take time out to reach out to people and socialise.
Now I feel that my life is meaningful, which means different for different people. I am happier than I ever was and I have fallen in love with programming again.