The commonest cause of psychosis is Brief Psychotic Disorder
Which may be provoked by lack of sleep; from over work, stress, drugs, drug withdrawal...
The cure is sleep - a few days of sleeping plenty of hours.
Since sleep will not come naturally; this usually requires sedation.
So if you suspect you are going crazy, and have not been sleeping much, there may be a window of opportunity when you could self-treat by sedation and sleep (before you will be admitted to a hospital and treated by sedation).
Most sedative drugs are only available with a prescription, which takes time - but there are some antihistamines that are available without prescription (over the counter) that should work just as well.
Indeed, these drugs are and have often been used in hospitals for sedating acutely psychotic people.They are old drugs, discovered in the 1940s, and generally regarded as among the safest of drugs for most people (e.g. they are often used in pregnancy):
Promethazine (e.g. Phenergan), Diphenhydramine (e.g. Benylin), Chlorpheniramine (e.g. Piriton), and Alimemazine (e.g. Vallergan) are some examples of sedative antihistamines which may be available without a prescription.
The hospital experience is that just a few days of effective sedation and sleep are enough completely to cure a Brief Psychotic breakdown - and the same would be expected when self medicating to abort such an attack before it gets severe enough to require hospitalization.
More explanation, references and detail are in my book from 2000, Psychiatry and the Human Condition at:
Be aware that in this book, Brief Psychotic Disorder is discussed under the heading of Mania.