This might sound silly but I'd consider getting my dog a dog. This will not be the absolute solution but your dog will have a companion and your house will have more life.
Loneliness is a state of mind. And sometimes when I am with people I feel the most alone. So above all else just be kind to yourself. Eat well, watch things you enjoy, do things you always dreamt of doing as a kid. That is how I stay sane at least, haha.