Obsessing over loneliness is a key factor in the development of depression
english.elpais.com
english.elpais.com
Sounds like Revictimization !!!
This doesn't suggest that gratitude is necessarily the prescription. Rather, activity. If you spend your time doing engrossing things, then you're less likely to become depressed - and (I would argue) more likely to meet interesting people.