To be "beside yourself" is an idiomatic expression indicating extreme levels of emotion, usually negative ones such as frustration, anger, or grief. Like all idiomatic expressions, it is not meant to be taken literally. Instead, it is a metaphor that relies on context and all parties understanding its implication in order to have meaning.
The origins of "beside yourself" are rooted in the Bible. In Acts 26:24, the 1611 King James Version of the Bible reads, "Paul, thou art beside thyself; much learning makes thee mad." The verse is describing a hearing of the Apostle Paul before Porcius Festus, a Roman official in Judea, and Festus is commenting on a display of anger by Paul.
Insight into the meaning of the phrase becomes apparent when reading a modern translation of the passage. In the New International Version of the Bible, which was completed in 1984 and intended to make the phrasing easier to understand for a 20th century audience, the same verse reads, "'You are out of your mind, Paul!' Festus shouted. 'Your great learning is driving you insane.'" The modern translation helps communicate the severity of emotion "beside yourself" is supposed to convey. In the case of Paul, this anger has driven him to the point of madness.
This phrase can be extremely confusing to non-native speakers of English. Taken literally, it would seem to mean the impossible situation of a duplicate person standing beside the original. This is not the intent of the phrase, even though it is a perfectly accurate parsing of its constituent words.
Rather, when an individual remarks that another appears to be beside himself with anger, he means that person is feeling intense anger, and is indeed about as angry as possible. The same implication applies for whatever modifier is used, whether it is sadness, happiness, or any other feeling. To be beside yourself means that you are at the extreme upper limit of an emotion.
English as a Second Language (ESL) courses routinely spend at least a lesson or two focusing on idioms such as beside yourself. Since literal translations are useless, specific explanations must be made for each phrase. Local vernacular is typically among the last aspects of a language learned by a non-native speaker, and fluency is often defined as the understanding of idiomatic expressions in addition to mastery of a language's grammar and vocabulary.