Dealing with loneliness as a professor
I’m afraid you are misinformed. Professors (including in STEM) are ordinary humans and are entitled to the same set of feelings, emotions and lifestyle choices as other people are accorded by the rest of society. They certainly might suffer from loneliness, and deal with it in the same way that any other person might.  But what you wrote about “Any projection of any other feelings is discouraged, e.g. feelings of romance”? Respectfullly, that notion is simply nonsense, and to the extent that it is a belief some people hold, it needs to die a swift, painless death.

As for the peculiarities of the situation a professor might end up in of being a professional, highly educated single person of a certain age range living in a small college town where there aren’t many other single people of the same age range and interests who may be suitable dating partners: well, again, that situation is by no means unique to college professors. Many people live in small towns with limited dating options. Somehow they manage, and for those who find this really intolerable, there’s always the option of trying to get a job in a bigger city or near one.