In the chapter 35, Section 3 of Satarudra-Samhita of Shiva Purana, the story of incarnation of Shiva as Saintly Brahmin is mentioned.
On realising the excellent devotion of Mena and Himavat towards Shiva, the gods became worried and they consulted one another eagerly. If the mountain were to give his daughter to Shiva with undiluted devotion, certainly he will attain salvation immediately. He is the receptacle of infinite gems. If he attains liberation, the name of the earth, Ratnagarbha (having gems within) will certainly be meaningless. He will cast off the stationary state of a mountain and assume a divine form. After giving his daughter in marriage to the trident-bearing lord he will go to Shiva’s region.
With the blessings of Shiva he will attain identity in form with the great god. He will enjoy all great pleasures there and then attain liberation. After discussing like this, the gods went to the abode of their preceptor. In order to achieve their self-interest they submitted to the preceptor thus.
The gods said:--
“O preceptor, please go to the abode of Himavat for the accomplishment of our task. Reproach lord Shiva and try to prevent the mountain’s excessive devotion to him. O preceptor, if the mountain gives his daughter to Shiva with great faith he will attain salvation. Let him stay on the Earth itself.”
On hearing the words of the gods, he thought over that and spoke to them. The preceptor said:--
“O gods, one of you shall go to the mountain for achieving the end. I am incapable of doing it. Or you all, including Indra, go to Brahma’s region. Tell him all your details. He will carry out your work.”
On hearing these words and reflecting thereon, the gods went to Brahma’s assembly. They submitted all the details to Brahma. On hearing their words and reflecting deeply Brahmā told them—“I shall not censure him, for that will yield misery to us and dispel out happiness for ever. O gods, you go to Kailasa and propitiate Shiva. Request that lord to go to the abode of Himavat. Let him approach the lord of mountains and censure himself. Censuring others is conducive to destruction and censuring oneself is conducive to glory.”
Then the gods hastened to Kailasa and bowed to Śhiva with great devotion. They mentioned everything in detail to him. On hearing the words of the gods, lord Shiva accepted their proposal. He laughingly consoled the gods and made them return without worry.
Then lord Shiva, who is favourably disposed towards his devotees, who is the wielder of Maya and who is free from aberrations, desired to approach Himavat. He assumed the form of a Brahmin Saint. He held a staff and an umbrella. He wore divine garments. A brilliant caste mark shone on his forehead. He had tied a Salagrama stone round his neck and held a string of crystal beads in his hand. He frequently repeated the names of Vishnu with devotion. He approached Himavat who was accompanied by his kinsmen.
On seeing him, Himavat and his attendants stood up and then prostrated before him. They performed Aṣṭanga salvation on the ground. Then the lord of mountains asked him “Who are you please?” The Brahmin Yogin replied immediately with reverence. The Saintly Brahmin said:--
“O mountain, I am a devotee of Vishnu known as Sadhudvija. I possess true vision. I am omniscient and I assist others. By the power of the preceptor I can go everywhere. O excellent mountain, by my divine knowledge, I have known something while I was in my abode. Listen. I shall mention the same with pleasure to you without any arrogance. You wish to give your daughter who is as comely as Lakṣmi to Shiva whose family and conduct are unknown.
O lord of mountains, this idea of yours is not conducive to auspiciousness. O most excellent one among the wise, born of Vishnu’s race, you should know this. O lord of mountains, see for yourself. He has no single relative. You can verify your relatives and your beloved. Ask Mena and others excluding Parvati. O mountain, the patient never likes the medicine but relishes undesirable diet. In the matter of gifting away Parvati, he is not the deserving person. As soon as this alliance is announced, the public will smile derisively. He is without support. He is unattached. He is ugly, devoid of attributes and unchanging. He is hideous. He resides in the cremation ground. He is naked and handles serpents He smears ashes as decoration. Serpents twine round his head. He has fallen from all stages of life. His ways are ever unknown. After saying these factual statements insulting to Shiva, Shiva of diverse sports, quickly returned to his abode.”
On hearing the words of the Brahmin, they thought thus—“What can we do with regard to him who is engrossed in adverse things?”
Then Shiva performed great sports delighting the devotees. He married Parvati aud carried out the task of the gods.
Thus the incarnation of lord Shiva as Sadhuveṣadvija, that carried out the task of the gods has been narrated to you.