I’ve lived in Tokyo a few times and didn’t feel it was especially lonely for a big city. Or rather it has the potential to be as cold and lonely as any other big city if you just work and go home and don’t meet people. In some ways its easier to meet other expats because you have outsider status in common, though as some of them inevitably move I suppose it could get lonelier.