In ancient times, oracles, mediums and other spiritual figures often used
bouts of madness to convey communion with gods or spirits. "
Divine Madness", some historians have called it.
What if it was the same sort of tradition was adopted as doctrine by the Catholic Priesthood?
What sort of effect might this have had on the early church and potential the study if mental illness in middle ages?
I think this is completely impossible or, in other words, that it would result in a "Catholic Church" which would have absolutely nothing to do with what those words mean IOTL.
Very early Christianity did have a tradition of "divine madness": speaking in tongues and prophesying. Already in the Epistles of Paul (the earliest know Christian texts) there is a marked reluctance to accept those practices. As time went by, this reluctance became utter rejection. And for good reason. Later Christianity is focused on "orthodoxy", i.e. unity of teaching. The idea is simple: two different Christian preachers should say the same things. Otherwise, splinter groups will inevitably appear and eventually mutual accusations, outright fighting (riots over religious matters were common) and puzzled believers. Christianity as we know it built itself around this line of thinking during roughly the first 5 centuries of the current era.
Of course, this absolutely rules out stoned or delirious priests. How can you guarantee the orthodoxy of such people ?
Naturally, one can imagine that this idea of "orthodxy" does not emerge and that some judeo-greek religious current(s) develops while maintaining ecstatic practices. But this is no longer Christianity and certainly not the Catholic Church.
The reason Christianity developped around the idea of orthodxy probably has a deeper reason that just an effort to maintain harmony within the community. The Christian Gospel is about a crucified leader, i.e. a failure. The whole point is to imbibe this story in order to plunge oneself into a mood of defeat and submission. Drug-induced ecstasy is at the opposite end of the psychological spectrum. Apart from the occasional bad trip, being high is about feeling superhuman, invincible, detached from the weaknesses of human life. And mental illness can be anything. From the perspective of the listener, it is essentially random. If Christianity's mental discipline of defeat had been allowed to mingle with drug-induced boasts of superhumanity and/or quasi-random mentally ill noise, it would probably have been drowned in the pandemonium and we would most likely never have heard of it.