This is the happiest time in the history of the world, and Japan is among the happiest of countries.

That should be true. It’s not, obviously. Why?

Globally, prosperity is wider spread and poverty less abysmal than ever before. Technology enables not only the mighty few but the run-of-the-mill masses — you, me, anyone — to perform miracles and wonders beside which biblical miracles and “Arabian Nights” fantasies pale. Everything we want is the merest click away. Socially, we’re freer than ever before — to live as we please, marry or not as we please, engage in whatever sexual practices turn us on, online or off, physical or virtual, without society batting an eye in disapproval or even surprise.

Our happiness is bounded only by our misery. Which turns out to be boundless.

Earlier this month the BBC summarized a number of studies showing a global decline in sexual activity. The countries specifically cited are the U.S., Britain, Australia and Japan. Various causes are suggested: too much internet use sapping interest in real-life socializing, too much internet porn sapping interest in real-life sex, too much work sapping sexual energy (mocking technology’s early promise of liberation from overwork) and so on. Objections are raised to each of these hypothetical causes, but a qualified consensus is emerging, the report says, to the effect that sexual lethargy “may be due to increasing levels of unhappiness. Western societies in particular have seen a mental health epidemic in the past few decades, focused primarily around depression and anxiety disorders.”

Also this month, The Japan Times published a report under a headline that bluntly inquires, “Why are Japanese teens so glum?” The research cited is by the London-based Varkey Foundation. It finds among Japanese aged 15-21 “the lowest level of net happiness of all 20 countries polled,” with “more Japanese young people (saying) they were unhappy (17 percent) than any other country apart from South Korea (also 17 percent).”

Here, too, reasons are partial and hypothetical, as no doubt they must be. Halfhearted family support is one. Japanese parents, apparently, are more distracted than Chinese, Indian, Nigerian and Indonesian parents, whose children seem markedly happier. Another perceived factor is a sense among young people that Japan is past its prime, while emerging economies, less prosperous for now but heading upward while Japan declines, instill in children a faith, enviable to the less optimistic Japanese, that “the world is not becoming a worse place.”

The weekly Spa! is a persistent chronicler of what might be called prosperous poverty, or maybe Dickensian prosperity. A Japanese neologism lately making the rounds is one borrowed (as most such are) from English: “self-neglect.” A Japanese-language equivalent translates into “masochistic depression.” Spa!’s source on one exemplar is, significantly, a cleaning expert whose specialty is the decreasingly uncommon “garbage house.” You reach a point where you just don’t care anymore, or where filth seems a perversely fitting backdrop to a life gone hopelessly wrong. It happens all too easily.

Yoshitaka Ishimi, the expert in question, tells of entering one such house and finding tacked on the wall a postcard written by a little girl, the late occupant’s daughter. Under a picture she’d drawn of a taxi, she wrote, “Papa, how are you?” She thought her father still worked as a taxi driver. She had no idea how far he’d fallen out of any semblance of orderly life. He’d been dead about two weeks when his body was found by a social worker and Ishimi was called in. It was not suicide, just a slow, apathetic wasting away. Among the garbage was a mountain of instant-noodle containers. It seems to have been all he ate. The kitchen alone was clean. All he’d done there, apparently, was boil water. “Dying alone” is a growing concern, associated mostly with the elderly, but Ishimi’s firm handles 500-odd cases of it a year, and he says 40 percent of the deceased are in their 40s.

“Self neglect” is not clinical depression, which is both worse and better — worse to the point of being clinical whereas self-neglect is not; better because clinical depression sufferers receive sympathy and care as patients, while self-neglectors are too easily dismissed as malingerers. It’s a busy world. Allowances are made (up to a point) for the certifiably sick, but who has time for the merely unhappy?

Unhappiness works in mysterious ways. You never know who it’ll strike, or why, or what form it will take. Spa! tells of a nurse in her 40s — a successful professional woman with a solid work record and friends and family who cared about her. They didn’t know her, though, and didn’t know they didn’t know her. One day she failed to show up at work. Her hospital called her sister. The sister went to her flat, and found the dead body among what turned out to be 7 tons of garbage. Imagine the shock. The sisters were close, and had met regularly, though not at the nurse’s apartment. What happened to her? No one seems to know.

School bullying figures as a cause of unhappiness in the Varkey Foundation report, and office bullying in Spa!’s. It’s a hypercompetitive jungle out there and everyone’s on edge, natural sympathy overwhelmed by pressure to triumph over others and get ahead. Spa! in addition invokes middle-age disillusion, a feeling of being “betrayed by life” among people who, by age 40, have seen to many of their youthful hopes wither. It’s what life does to you. Even the successful succumb, as how can they not when they get home to find, or be reminded, that “all they are to their kids is a walking ATM.”

Somehow the way we’re living, with all its promise of happiness, is making us miserable. Is there anything we can do about it? Spa! has a suggestion, presumably ironic (though maybe not): go homeless. In Osaka’s Airin district, where day laborers congregate and live in flophouses or on the street, a man in his 60s says, “Die alone in a room? No thanks!”

Give him homelessness. What he saves on rent he spends on liquor and, thus fortified, “I can sleep quite comfortably outside.” Maybe we all could. Hopefully, it won’t come to that.

Michael Hoffman is the author of “In the Land of the Kami: A Journey into the Hearts of Japan” and “Other Worlds.”