Datapoint: another halluciogen, ketamine, has been shown to effectively treat depression. Not sure if mechanisms of LSD are similar.
The visual system is very complicated, and many different classes of drugs can cause hallucinations in different ways without the overall experience being similar.
Ketamine and LSD do not have similar mechanisms in the brain, nor (from what I've read) are their effects qualitatively similar. LSD is a psychedelic acting as an agonist on 5-HT_2A receptors (among other things, but that's what it shares in common with other classic psychedelics. Ketamine is a dissociative anesthetic acting as an antagonist on NMDA receptors. LSD is, however, effective against migraines at sub-hallucinogenic doses.
This is a thread where people can ask questions that they would ordinarily feel embarrassed for not knowing the answer to. The previous thread is at close to 500 comments.