What is the origin of beside myself?

It means experiencing extreme joy. "Beside" was formerly (15th through 19th centuries) used in phrases to mean "out of a mental state or condition, as 'beside one's patience, one's gravity, one's wits'" (Oxford Engl. Dict.), and that use survives only in "'beside oneself': out of one's wits, out of one's senses."

"Beside himself. Why do we describe a distraught person as being 'beside himself'? Because the ancients believed that soul and body could part and that under great emotional stress the soul would actually leave the body. When this happened a person was 'beside himself.' This same thought is to be found in 'out of his mind'; and in 'estasy' too. 'Ecstasy' is from the Greek and literally means 'to stand out of.'" From "Dictionary of Word Origins" by Jordan Almond (Carol Publishing Group, Secaucus, N.J., 1998).

Source: The Phrase Finder