Mysticism is a crucial aspect of the study of religion. "One may say truly, I think, that personal religious experience has its roots and centre in mystical states of consciousness," William James writes in The Varieties. That said, it's important to be clear about what he means by phrases like "states of consciousness".
Our view is coloured by a psychologising tendency that's grown since James. It can be associated, in particular, with Abraham Maslow's notion of "peak experiences" – the ecstatic states that satisfy the human need for self-actualisation. This exaltation of feelings of interconnectedness is questionable on two counts.