In Mahabharata, Krishna/Vishnu shows his vishwaroopa four times. Is there a similar instance of Shiva showing his vishwaroopa? This question is specific to Mahabharata.
Vyasa said, 'O highly significant is this matter that thou enquirest of me from surprise. I will tell thee everything; listen attentively. He that is called Narayana is older than the oldest ones. For accomplishing some purpose, that creator of the universe took his birth as the son of Dharma. On the mountain of Himavat he underwent the severest ascetic austerities. Endued with mighty energy, and resembling fire or the sun (in splendour), he stood there with arms upraised. Possessed of eyes like: lotus-petals, he emaciated himself there for sixty-six thousand years, subsisting all the while upon air alone. Once more undergoing severe austerities of another kind for twice that period, he filled the space between earth and heaven with his energy. When by those austerities, O sire, he became: like Brahma he then beheld the Master, Origin, and Guardian of the Universe, the Lord of all the gods, the Supreme Deity, who is exceedingly difficult of being gazed at, who is minuter than the minutest and larger than, the largest, who is called Rudra, who is the lord of all the superior ones, who is called Hara and Sambhu, who has matted locks on his head, who is the infuser of life into every form, who is the First cause of all immobile: and mobile things, who is irresistible and of frightful aspect, who is of fierce wrath and great Soul, who is the All-destroyer, and of large heart; who beareth the celestial bow and a couple of quivers, who is cased in golden armour, and whose energy is infinite, who holdeth Pinaka, who is; armed with thunderbolt, a blazing trident, battle axe, mace, and a large sword; whose eye-brows are fair, whose locks are matted, who wieldeth the heavy short club, who hath the moon on his forehead, who is clad in tiger-skin, and who is armed with the bludgeon; who is decked with beautiful angadas, who hath snakes for his sacred thread, and who is surrounded by diverse creatures of the universe and by numerous ghosts and spirits, who is the One, who is the abode of ascetic austerities, and who is highly adored by persons of venerable age; who is Water, Heaven, Sky, Earth, Sun, Moon, Wind and Fire, and who is the measure of the duration of the universe. Persons of wicked behaviour can never obtain a sight of that unborn one, that slayer of all haters of Brahmanas, that giver of emancipation. Only Brahmanas of righteous conduct, when cleansed of their sins and freed from the control of grief, behold him with their mind's eye. In consequence of his ascetic austerities, Narayana obtained a sight of that unfading one, that embodiment of righteousness, that adorable one, that Being having the universe for his form.
Beholding that supreme Abode of all kinds of splendour, that God with a garland of Akshas round his neck, Vasudeva, with gratified soul, became filled with delight which he sought to express by words, heart, understanding, and body. Then Narayana worshipped that Divine Lord, that First cause of the universe, that giver of boons, that puissant one sporting with the fair-limbed Parvati, that high-souled Being surrounded by large bands of ghosts, spirits, that Unborn one, that Supreme Lord, that Embodiment of the unmanifest, that Essence of all causes, that One of unfading power. Having saluted Rudra, that destroyer of the Asura Andhaka, the lotus eyed Narayana, with emotion filling his heart, began to praise the Three-eyed one (in these words), 'O adorable one, O first of all the gods, the creator of everything (viz., the Prajapatis) who are the regents of the world, and who having entered the earth,--thy first work,--had, O lord, protected it before, have all sprung from thee. Gods, Asuras, Nagas, Rakshasas, Pisachas, human beings, birds, Gandharvas, Yakshas and other creatures: with the entire universe, we know, have all sprung from thee. Everything that is done for propitiating Indra, and Yama, and Varuna, and Kuvera and Pitris and Tvashtri, and Soma, is really offered to thee. Form and light, sound and sky, wind and touch, taste and water, scent and earth, 1 time, Brahma himself, the Vedas, the Brahmanas and all these mobile objects, have sprung from thee. Vapours rising from diverse receptacles of water, becoming rain-drops, which failing upon the earth, are separated from one another. When the time of the Universal dissolution comes those individual drops, separated from one another, once more unite together and make the earth one vast expanse of water. He that is learned, thus observing the origin and the destruction, of all things, understands thy oneness. Two birds (viz., Iswara and Jiva), four Aswatthas with their wordy branches (viz., the Vedas), the seven guardians (viz., the five essences or elements and the heart and the understanding), and the ten others that hold this city (viz., the ten senses that constitute the body), have all been created by thee, but thou art separate from and independent of them. The Past, the Future, and the Present, over each of which none can have any sway, are from thee, as also the seven worlds and this universe. I am thy devoted adorer,--be graceful unto me. Do not injure me, by causing evil thoughts to penetrate my heart. Thou art the Soul of souls, incapable of being known. He that knows thee as the Universal Seed, attaineth to Brahma. Desiring to pay thee respects, I am praising thee, endeavouring to ascertain thy real nature, O thou that art incapable of being understood by the very gods. Adored by me, grant me the boons I desire but which are difficult of acquisition. Do not hide thyself in thy illusion
And in the most amazing bit in all of Hindu scripture he gives a boon to Narayana that if even he fought him (Siva) he (Narayana) would be victorious !
In the same Drona Parva, we have:
In the Vedas the excellent hymn called Sata Rudriya, hath been sung in honour of that great God called the infinite Rudra. That God is the lord of all wishes that are human and heavenly. He is omnipotent, and he is the supreme master. Indeed, that God pervadeth the vast universe. The Brahmanas and the Munis describe him as the First-born of all creatures. He is the First of all the gods; from his mouth was born Vayu (the wind). And since he always protecteth the creatures (of the universe) and sporteth with them, and since also he is the lord of all creatures, therefore is he called Pasupati. And since his Phallic emblem is always supposed to be in the observance of the vow of Brahmacharya, and since he always gladden the world, therefore he is called Maheswara. The Rishis, the gods, the Gandharvas, and Apsaras, always worship his Phallic emblem which is supposed to stand upright. That worship maketh Maheswara glad. Indeed, Sankara (at such worship) becomes happy, pleased, and highly glad. And since with respect to the past, the future, and the present, that God has many forms, he is, on that account, called Vahurupa (many-formed). Possessed of one eye he blazeth forth in effulgence, or he may be regarded to have many eyes on every side of his body. And since, he possesseth the worlds, he is for that reason called Sarva. And since his form is like that of smoke, he is for that reason called Dhurjjati. And since those deities, viz., the Viswedevas are in him, he is for that reason called Viswarupa.
And when Arjuna obtains the Pashupata weapon Siva appears in a form that Arjuna needed special eyes to see:
I will grant thee eyes (to see me in my true form). Thou wert a Rishi before. Thou wilt vanquish all thy foes, even the dwellers of heaven; I will as I have been pleased with thee, grant thee an irresistible weapon. Soon shall thou be able to wield that weapon of mine."
Vaisampayana continued, "Phalguna then beheld him--Mahadeva--that god of blazing splendour-that wielder of the Pinaka-that one who had his abode on the mountains (of Kailasa)--accompanied by Uma.
And here is another instance:
"Sanjaya, said, 'After the rout of the Kuru army, upon the slaughter of that Atiratha, viz., Drona, by Prishata's son, Dhananjaya, the son of Kunti beholding a wonderful phenomenon in connection with his own victory, asked Vyasa, O bull of Bharata's race, who came thither in course of his wanderings, saying, 'O great Rishi, while I was engaged in slaying the foe in battle with showers of bright shafts, I continually beheld before me, proceeding in advance of my car, a person of blazing hue, as if endued with the effulgence of fire. Whithersoever he proceeded with his uplifted lance, all the hostile warriors were seen to break before him. Broken in reality by him, people regarded the foe to have been broken by me. Following in his wake, I only destroyed those, already destroyed by him. O holy one, tell me who was that foremost of persons, armed with lance, resembling the sun himself in energy, that was thus seen by me? He did not touch the earth with his feet, nor did he hurl his lance even once. In consequence of his energy, thousands of lances issued out of that one lance held by him.'
"Vyasa said, 'Thou hast, O Arjuna, seen Sankara, that First cause from which have sprung the Prajapatis, that puissant Being endued with great energy, he that is the embodiment of heaven, earth and sky, the Divine Lord, the protector of the universe, the great Master, the giver of boons, called also Isana. O, seek the protection of that boon, giving Deity, that lord of the universe. He is called Mahadeva (the Supreme Deity), of Supreme Soul, the one only Lord, with matted locks (on head), the abode of auspiciousness. Of three eyes and mighty arms, he is called Rudra, with his locks tied in the shape of a crown, and his body attired in skins. That boon-giving lord of the universe, that Supreme Deity, is also called Hara and Sthanu. He is the foremost of every being in the universe, he is incapable of being vanquished, he is the delighter of the universe and its supreme ruler. The first cause, the light and refuge of the universe, he is ever victorious. The Soul and the creator of the universe, and having the universe for his form, he is possessed of great fame. The Lord of the universe, and its great Ruler, that puissant one, is also the master of all actions. Called also Sambhu, he is self-born, he is the lord of all creatures,
Mahabharat verily describes Lord Shiva as Viswarupam. Besides Mahabharata there are other Scriptures (From Vedas to Puraanas) where Lord Shiva is described as having Universal Form. But as Question is specifically addressed toward Mahabharata, answer is having more reference from Mahabharata Only.
“vadantyagnı̃ mahādēvaṁ tathā sthāṇũ mahēśvaram |
caiva VIŚVARŪPAṁ śivaṁ tathā ||”
"The Rishis describe Mahadeva as Agni, and Sthanu, and Maheswara; as one-eyed, and three-eyed, of UNIVERSAL FORM, and Siva or highly auspicious. "ēkākṣaṁ tryambakaṁ
There are other instances as well.
Salutations to thee that art the destroyer of the triple city of the Asuras, to thee that art the destroyer of (Daksha's) sacrifice, to thee that art the destroyer of the body of Kama (the deity of Desire), to thee that wieldest the rod of destruction. Salutations to thee that art Skanda, to thee that art Visakha, to thee that art the rod of the Brahmana, to thee that art Bhava, to thee that art Sarva, to thee that art of universal form.
Reference - https://www.sacred-texts.com/hin/m13/m13a014.htm
Again Bhisma, in Mahabharat says
"Bhishma said, 'I am quite incompetent to recite the virtues of Mahadeva of highest intelligence. He pervades all things in the universe and yet is not seen anywhere. He is the creator of universal self and the Pragna (knowing) self and he is their master. All the deities, from Brahman to the Pisachas, adore and worship him. He transcends both Prakriti and Purusha. It is of Him that Rishis, conversant with Yoga and possessing a knowledge of the tattwas, think and reflect. He is indestructible and Supreme Brahman.
Reference: - https://www.sacred-texts.com/hin/m13/m13a014.htm
Even Veda-Vyasa mentions Vishwarropam of Mahadeva.
"Beholding Maheswara, and knowing that he was the Supreme Being, the Grandsire Brahma thus adored him: Thou art Sacrifice, O lord, thou art the stay and refuge of the universe. Thou art Bhava, thou art Mahadeva, thou art the abode (of all things), and thou art the highest refuge. This whole universe with its mobile and immobile creatures, is pervaded by thee. O holy one, O lord of the past and the future, O lord of the world, O protector of the universe, let Sakra, afflicted with thy wrath, have thy grace.'
Reference: - https://www.sacred-texts.com/hin/m07/m07198.htm
Bhisma himself admitted that he cannot comprehend the Mahadeva and hence asked Shri Krishna for the same. Clearly Bhisma was well aware of Shiva's Universal form.
"Bhishma said, 'Thou art the Master of all the deities and the Asuras. Thou art illustrious. Thou art Vishnu in consequence of thy pervading the whole universe. It behoveth thee to discourse on those subjects connected with Siva of universal form about which Yudhishthira has asked me. In days of yore, the Rishi Tandin, sprung from Brahma, recited in Brahma's region and before Brahma himself the thousand names of Mahadeva. Do thou recite those names before this conclave so that these Rishis endued with wealth of asceticism, observant of high vows, possessed of self-restraint, and numbering the Island-born Krishna among them, may hear thee. Do thou discourse on the high blessedness of Him who is immutable, who is always cheerful and happy, who is Hotri, who is the universal Protector, who is Creator, of the universe, and who is called Mundin and Kaparddin.'
There are other references as well.
My mother said, 'Mahadeva is exceedingly difficult to be known by persons of uncleansed souls. These men are incapable of bearing him in their hearts of comprehending him at all. They can retain him in their minds. They cannot seize him, nor can they obtain a sight of him. Men of wisdom aver that his forms are many. Many, again, are the places in which he resides. Many are the forms of his Grace. Who is there that can understand in their details the acts, which are all excellent, of Isa, or of all the forms that he has assumed in days of yore? Who can relate how Sarva sports and how he becomes gratified? Maheswara of universal form resides in the hearts of all creatures.
Further She also reveals Mahadeva of thousands (Infinite) hands, feet, head and stomachs.
It is Mahadeva who bears the forms of persons with sticks and those with umbrellas and those with calabashes among Brahmanas. 1 He sometimes becomes six-faced and sometimes becomes multifaced. He sometimes assumes forms having three eyes and forms having many heads. And he sometimes assumes forms having many millions of legs and forms having innumerable stomachs and faces and forms endued with innumerable arms and innumerable sides. He sometimes appears surrounded by innumerable spirits and ghosts.
Now quoting reference from Vedas.
अर्हन बिभर्षि सायकानि धन्वार्हन निष्कं यजतं विश्वरूपम |
अर्हन्निदं दयसे विश्वमभ्वं न वा ओजीयो रुद्र तवदस्ति ||
Worthy, thou carriest thy bow and arrows, worthy, thy manyhued and honoured necklace. Worthy, thou cuttest here each fiend to pieces: a mightier than thou there is not, Rudra.
Further more there is entire Sata-Rudriyam hymn present in the taittiriya Samhita of Yajurveda.
The above quoted URL is of Namakam Portion of Rudram where Universal Form of Mahadeva is described in details.
Coming to Puraanas,
In the Kurma-Puraana there is Ishwar Gita where Lord Shiva shows his Universal Form.
सहस्रशिरसं देवं सहस्रचरणाकृतिम् ।
चन्द्रार्धकृतशेखरम् ॥ ५.८॥
दण्डपाणिं त्रयीनेत्रं सूर्यसोमाग्निलोचनम् ॥ ५.९॥
स्वेन सर्वमावृत्य च स्थितम् । सूर्यकोटिसमप्रभम् ॥ ५.१०॥ । सृजन्तमनलज्वालं दहन्तमखिलं जगत् ।
नृत्यन्तं ददृशुर्देवं विश्वकर्माणमीश्वरम् ॥ ५.११॥
Meaning: - Rudra having infinite heads, infinite feets, infinite hands, with matted lock of hairs adorned by crescent moon on head, wearing skin of tiger, holding trident and dand in his hand, having three eyes resembling sun, moon and fire self-illuminous situated in (whole) universe, having horrible fangs, possessing splendour of infinite suns, who is inside the cosmic egg as well as outside of cosmic egg, creating destroyable fire which can convert entire creation into ashes, that Lord Vishwakarma- Shiva (Lord of all actions/Karma) was seen dancing by the sages.सहस्रबाहुं जटिलंवसानं चर्म वैयाघ्रं शूलासक्तमहाकरम् ।ब्रह्माण्डं तेजसादंष्ट्राकरालं दुर्द्धर्षंअण्डस्थं चाण्डबाह्यस्थं बाह्यमभ्यन्तरं परम्
Similarly, in the Padma-Puraana there is Shiva-Gita where Lord Shiva reveals his Universal form.
श्रीभगवानुवाच .. मयि सर्वं यथा राम जगदेतच्चराचरम|
तद्दर्शयामि न द्रष्टुं क्षमते भवान 
तुभ्यं दशरथात्मज . तेन पश्य भयं त्यक्त्वा मत्तेजोमण्डलं ध्रुवम 
न चर्मचक्षुषा द्रष्टुं शक्यते मामकं महः |
तन्ममानुग्रहं विना 
Sri Bhagavan said: O Rama! This entire mobile and immobile creation dwells inside my belly. You do not have enough strength and capability to witness that scene. With these eyes of flesh neither human nor god can every be able to see my brilliant cosmic form without my grace. Therefore, O son of Dashratha! I’m giving you divine eyes (divya drishti) do not fear and properly see my divine cosmic form.
सूत उवाच .. इत्युक्त्वा प्रददौ तस्मै दिव्यं चक्षुर्महेश्वरः . अथादर्शयदेतस्मै वक्त्रं पातालसंनिभम 
नरेण वा सुरेणापि
तद्दृष्ट्वैव भयाद्रामो जानुभ्यामवनिं गतः 
प्रणम्य दण्डवद्भूमौ तुष्टाव च पुनः पुनः
अथोत्थाय महावीरो यावदेव प्रपश्यति 
वक्त्रं पुरभिदस्तत्र अन्तर्ब्रह्माण्डकोटयः |
चटका इव लक्ष्यन्ते ज्वालामालासमाकुलाः 
मेरुमन्दरविन्ध्याद्या गिरयः सप्तसागराः |
दृश्यन्ते चन्द्रसूर्याद्याः पञ्च भूतानि ते सुराः 
अरण्यानि महानागा भुवनानि चतुर्दश |
प्रतिब्रह्माण्डमेवं तद्दृष्ट्वा दशरथात्मजः 
सुरासुराणां संग्रामस्तत्र पूर्वापरानपि | विष्णोर्दशावतारांश्च तत्तत्कर्माण्यपि द्विजाः 
पराभवांश्च देवानां पुरदाहं महेशितुः |
उत्पद्यमानानुत्पन्नान्सर्वानपि विनश्यतः 
दृष्ट्वा रामो भयाविष्टः प्रणनाम पुनः पुनः |
बभूव रघुनन्दनः 
अथोपनिषदां सारैरर्थैस्तुष्टाव शंकरम 
Suta said: In this way spoke lord Shiva and blessed Rama with divine eyes. Thereafter lord Shiva showed Rama by opened his mouth which was as wide as Patala loka. Blazing with billions of lightening strikes seeing such a dreadful scene Sri Rama trembling with fear collapsed on the ground on his knees. He prostrated on the ground and numerous times he prayed to Lord Shiva. Then that mighty armed hero Rama gaining some strength again looked at the cosmic form of the Eswara the destroyer of the three cities. He sighted billions of universes as like as the groundnuts being roasted in blazing fires. He saw inside the mouth Meru, Mandara Vindhya etc. giant mountains, seven great oceans, Sun, moon and planets, five elements, all deities, all dense forests. He also witnessed the mighty serpent Adi-Sesha, fourteen worlds, in every universe he witnessed Devasura Sangrama (battles of gods and demons), their cause and effects. He also witnessed Lord Vishnu’s ten primary incarnations and their roles, duties and work. He witnessed God’s valor, the event of destruction of the three cities by Shiva. He saw all the creatures who are yet to be born, which were born in past and which were being born. He further saw the destruction of all these creation. Seeing that horrifying scene, Sri Rama despite being a wise man, trembled with fear and saluted Lord Shiva again and again. Then Rama sang the essence of all Upanishads as a hymn in praise of Lord Shiva.दिव्यं चक्षुः प्रदास्यामिवर्ततेउत्पन्नतत्त्वज्ञआनोऽपि