Is there a general name for such diseases?
Per Abdur Rahman's request, here's an answer that expands on my brief comment.
Folie a plusieurs is also known more prosaically as mass hysteria. From Wikipedia, "Other names include collective hysteria, group hysteria, or collective obsessional behavior — in sociology and psychology refers to collective delusions of threats to society that spread rapidly through rumors and fear. In medicine the term is used to describe the spontaneous manifestation of the same or similar hysterical physical symptoms by more than one person. A common manifestation of mass hysteria occurs when a group of people believe they are suffering from a similar disease or ailment, sometimes referred to as mass psychogenic illness or epidemic hysteria... manifesting as collective symptoms of disease sometimes referred to as mass psychogenic illness or epidemic hysteria. Mass hysteria typically begins when an individual becomes ill or hysterical during a period of stress. After this initial individual shows symptoms, others begin to manifest similar symptoms, typically nausea, muscle weakness, fits or headaches..."
Aka contagions, fads, trends bubbles.
Charles McKay's 1841 book Extraordinary Popular Delusions and The Madness of Crowds may have initiated a veritable genre of literature which, in recent years, has become a kind of literary bubble. See Malcolm Gladwell's The Tipping Point, Jonah Berger's Contagious or Harrison White's published work on networks (laterally related to contagions). White is an influential sociologist at Columbia and many currently prominent academics studied under him, most notably Marc Vanoevetter whose work on the mathematical models underlying contagions is a key theme in Gladwell's book. The sociological literature on this is rich. Recently published research covers areas as expansive as the social processes underlying the consecration of cultural products, which refers to the ability of some legitimating cultural authority, sometimes crowdsourced, to impose symbolic judgments of rank, status, prestige or distinction on things that may have started as contagions, fads or bubbles but which evolved into more stable social processes.
The full Wiki entry on mass hysteria is actually hilarious with thumbnail descriptions of many events in history that evidence this phenomenon including those already mentioned but also the Salem Witch Trials, the Halifax Slasher, the Tanganyika Laughter epidemic, the West Bank fainting epidemic, the epidemic of autoerotic suicides among Westchester County (NY) teenagers of the 90s, etc., etc. The list of possible outbreaks to enumerate is too long and often tawdry to go through in any detail.
In finance, "madness" of this type is often called a bubble which is a term describing unrealistic prices detached from intrinsic value. The classic example of this financial delusion is the Dutch Golden Age Tulip Mania of the mid-1630s in which prices for tulip bulbs soared astronomically over a period of months only to collapse within a matter of days, bankrupting hundreds of people. Cognates of financial bubbles include herding behaviors, lemmings, cascades or he Pied Piper Syndrome. All are good metaphors for the behavior.
Also note that Robert Shiller, the Nobel Laureate, titled a book Irrational Exuberance which was a behavioral economist's take on the rampant overconfidence that bubbles can spawn among investors. Greenspan picked up on this theme with his comments back in 1999 that burst the Dot Com Bubble.
I think you're taking about
folie à plusieurs ("madness of many") a.k.a shared psychotic disorder
See the wikipedia article for Folie à deux.
Folie à deux (/fɒˈli ə ˈduː/; French pronunciation: [fɔli a dø]; French for "a madness shared by two"), or shared psychosis, is a psychiatric syndrome in which symptoms of a delusional belief are transmitted from one individual to another. The same syndrome shared by more than two people may be called folie à trois, folie à quatre, folie en famille or even folie à plusieurs ("madness of many"). Recent psychiatric classifications refer to the syndrome as shared psychotic disorder (DSM-IV) (297.3) and induced delusional disorder (F.24) in the ICD-10, although the research literature largely uses the original name. The disorder was first conceptualized in 19th-century French psychiatry by Charles Lasègue and Jean-Pierre Falret and so also known as Lasègue-Falret Syndrome.
A bit of extra clicking through Wikipedia from the Dancing Plague leads to Mass psychogenic illness which says:
"the rapid spread of illness signs and symptoms affecting members of a cohesive group, originating from a nervous system disturbance involving excitation, loss or alteration of function, whereby physical complaints that are exhibited unconsciously have no corresponding organic aetiology."
Or in lay terms, a disease that spreads without an biological source.
This is a culture-bound syndrome, which Wikipedia calls "a combination of psychiatric and somatic symptoms that are considered to be a recognizable disease only within a specific society or culture." There are quite a number of these, however the actual list is controversial, since medical experts within and outside a particular culture may disagree on what belongs in that category.