The battle to stop the coronavirus pandemic, fought with social distancing and enforced isolation, is taking a psychological toll that some officials warn could prompt another crisis, a mental-health one.

Billions of people from the U.S. to Italy have been ordered to stay at home. Germany, Australia and the U.K. have determined that two people are a crowd and millions are cut off from family members, lovers and friends.

Beyond...