First of all, there are many forms of tasawwuf (Arabic for: mysticism), some of which are in conformity with the Qur’an and Sunnah and others are in contradiction with Islam.

Genuine and authentic Sufism refers the practical discipline of souls, curing of diseases of hearts, implanting of virtues, and purging souls of their vices and carnal desires, and training in patience; it is struggle against the carnal soul and combating its base inclinations and meticulous scrutiny of actions and non-actions, and guarding souls against the invasions and influx of heedlessness and vain thoughts, and severing off all hindrances and obstacles that hinder and hamper one’s journey to Allah.

Sheikh Mohamed El-Moctar El-Shinqiti, director of the Islamic Center of South Plains, Lubbock, Texas, states: If mysticism means the “direct experience of the divine” in the pantheistic sense as Western philosophers define it, Prophet Muhammad (peace and blessings be upon him) was not a mystic.

Actually, pantheism is in stark contradiction with the Islamic concept of monotheism. If you mean, however, the ascetic life and the self-deprivation from the excesses of this world in preparation for the eternal life, and the constant remembrance of God at all times, then Prophet Muhammad (peace and blessings be upon him) was a great mystic (Arabic for: sufi) in Islamic terminology.
Sufism, as an expression of Islamic spirituality, is a genuine component of Islamic faith and practice, and the great Sufis in Islamic history, such as Al-Ghazali, provided good examples of piety that inspired Muslims and non-Muslims alike.