Apparently the word "beside" had a different meaning hundreds of years ago. It doesn't make sense in modern english. It is simply a phrase that we have kept using.From "Dictionary of Word Origins" by Jordan Almond
"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
"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."