In Plato's Phaedrus, the philosopher lists these madnesses. In the dialogue, Plato recounts Socrates saying, firstly, that there are two madnesses: one produced by 'human infirmity' and one of divine origin. Socrates then goes on to sum up the latter madnesses thus:
"The divine madness was subdivided into four kinds, prophetic, initiatory, poetic, erotic, having four gods presiding over them; the first was the inspiration of Apollo, the second that of Dionysus, the third that of the Muses, the fourth that of Aphrodite and Eros."
The 'initiatory' madness of Dionysus is the madness of religious ritual, the 'loss of self', as Julian says, through ecstatic worship.
For more on the cultural significance of madness in Ancient Greece, try E.R. Dodds' famous work The Greeks and the Irrational, Chapter III, 'The Blessings of Madness'.