You will find many suggestions that sounds good on paper. The reason you are struggling is because you don’t engage your brain enough. Half your loneliness
1/ Pick up a tough/brainy topic (eg: semiconductors, quantum physics, football tactics, strategy games) which engages your brain and gives you that feeling of accomplishment. Your job seems to not engage you intellectually. Most nerds have this issue. This will help you more than socializing.
2/ join blogs like EA, ACX, less wrong. It offers you new perspectives, and the meetups help you meet people who are deep thinkers excited by the complexity.
3/ leave bangalore. Difficult.
4/ for dating, right now look for friends. Friends who can have engaging conversations with you. Go for treks, trips, where you meet people outside of tech. Go live in zostels and ask when you visit a new city. Don’t focus on dating, let it happen organically.
5/ just plain. Take more risks. Do something stupid. Something that goes against your grain. The adventure and adrenaline rush makes you feel good.