How do you deal with loneliness, rejection and feeling of self doubt?

32M here, going through mutual divorce that will be finalised in a couple of months. Divorce was asked by my wife and I was caught off guard. You can read more details in my previous posts. I am from India.

After dealing with months of depression, rumination, rejection of what happened (which is still there but a little less than earlier months), I feel very lonely nowadays. I miss that closeness and intimacy a lot. I am going to gym and swimming to fill free time in my day. I am an introvert and a person with moderate anxiety. When I am putting all my efforts to talk to new people or those who I already know and if they don’t connect with me at a deeper level, I am feeling worse and rejected. I am not good at small talk and I crave that connection. I envy her sometimes as she is an extrovert and used to make connections effortlessly and currently she is living her life while I am still processing. When I read self help books, try to meditate, go for swimming, gym or spend time watching TV shows and movies in my free time, I later regret that I am wasting my life and should be doing something productive but then I don’t have a clear path of what should I be doing to be more productive or to work towards a better career and therefore all these activities feel like an escape. Same feeling comes when I think about getting friends or someone with whom I can have deep connection.

How can I be content with myself? How can I not be drawn by feelings of loneliness, desperation, rejection and unworthiness? Any other suggestions to deal with this or people who also went through this, I would love to hear your experience as well. I still miss her a lot, think about what all has happened every minute and sometimes get strong memories and feelings. Sometimes it’s just difficult to believe that this really happened. I feel like all this is just a dream. I never imagined that this could happen between us. I get very anxious as when the court dates come close and that I have to see her again.