According to the Gītā, dedicating every activity to the all-pervading brahman or working with divine inspiration is called ‘arcana’ (roughly translated as ‘worship’ or ‘praise’). The means of this worship is sva-karma, i.e., activity attuned to the temperament (sva-dharma) of the individual. Only this kind of worship leads an individual to perfection.
येन सर्वमिदं ततम्।
सिद्धिं विन्दति मानवः ॥
One finds fulfillment (siddhi, perfection)
by working in harmony with his natural abilities
and making that as an offering to the One,
who pervades this universe and
from whom all creatures have arisen.
Kṛṣṇa is a karmayogi (one who works without selfish motive and without an eye on the rewards). In the Mahābhārata he is a character with great brilliance; he is an embodiment of fortitude; he is dignified and profound in thought, word and action and yet he is so amicable and friendly towards all. He never complains and never displays lack of enthusiasm or over enthusiasm; however, his courage is never reckless, but rather carefully thought out; he knows his limitations and never undertakes endeavours beyond his capacity. This is what stops him from taking on Jarāsandha and leaving Mathura. But he waits for the right moment; when he is well-equipped, he strategically gets him killed.
Among the Pāṇḍavas, the ever-complaining Dharmarāja, the ever-restless Bhīma, and the spineless Nakula-Sahadeva never became close to Kṛṣṇa, but it was only Arjuna, far more competent and steadfast than his brothers, who became intimate with Kṛṣṇa. Thus Kṛṣṇa and Arjuna were such good friends, aligned in thought and emotion. Perhaps Bhīṣma was the only one who could understand Kṛṣṇa’s greatness and maturity; nobody else realized Kṛṣṇa’s pre-eminence of personality the way he did. Kṛṣṇa was worried about Bhīṣma when he was lying on the bed of arrows; the grand old man of the Kurus, in his last moments, took Kṛṣṇa’s approval before discarding his body. Vidura was an honest man, always on the side of dharma; he was an embodiment of sattva; that was why he and Kṛṣṇa trusted each other so much. But Vidura was helpless; his was merely a cry in the forest (there was none to listen to his woes or follow his advice). Finally, he gave up everything – food, water and clothes - and found his end in the forest. Perhaps the only person who might have been of some help to Vidura was Dharmarāja, who was near him when he gave up his life. It appears that they were manifestations of the same deity of dharma.
We do not know which deity Kṛṣṇa offered his worship to. He had a lot of respect and devotion towards his parents, teachers, and elders. He had immense respect not just towards his parents, but also towards his aunt Kuntī; there is not a single instance where he does not pay obeisance to her, departs without talking to her at least for a while. Dharmavyādha worshipped his parents alone; he demonstrated to Kauṣika that his parents were indeed his chosen deities and sent him back a wiser man. We also don’t know the chosen deities of the other characters of the Mahābhārata. Brāhmaṇas and kṣatriyas were constantly engaged in the performance of yajñas. Yajña is an act of worship. In practise, yajña was directed towards pleasing Indra and other deities by offering animals, soma, and other objects into the fire (which is both a deity and the medium to take the offerings to the other deities), adhering to the rules of the śrauta. The yajñas and yāgas were expansive in nature and would sometime run into years. The Bhagavad-Gītā has given a simple meaning to yajña, which is broad and magnanimous. Yajña does not only refer to dravya-yajña, i.e., limited to the material level. Tapas, yoga, adhyayana (study) and jñāna (knowledge) are also seen as yajñas; the jñāna-yajña is better than ruling over a kingdom (Gītā 4.25-33).
The Mahābhārata was composed after the Vedic age and before the birth of the Purāṇas. Therefore, there are many references to different yāgas and yajñas that are undertaken to please Vedic deities such as Agni, Indra, Varuṇa, the Maruts, the Aśvini, Prajāpati-brahma, and others. We also find many instances of philosophical contemplation. In some other places in the epic, we see the emergence of Śiva and Viṣṇu as independent deities. Indra and other Vedic deities do not have the same prominence they had during the age of the Saṃhitās. The deities come down to earth in human form (bodily form) with humanly attributes (clothing, ornaments, speech, etc.) and participate in worldly activities. In the times of the Mahābhārata, they could be invoked by mantras and made to bestow favours, unlike in the Sūkta period, when they were prayed to and worshiped for the sake of timely rains and good crops. Indra, who was supreme among the deities, is reduced to such a condition (in the epic) that when the words “Sendrāya takṣakāya svāhā” are uttered, he comes down to the place of the yajña all the way from his celestial world, being unable to protect a serpent who he had hitherto promised refuge. Sūrya, Yama, Vāyu, and Indra come down even when Kuntī, a mere mortal, chants a mantra—whether they like it or not—and fulfill her wishes. Agni too, having taken Arjuna’s favours, brings him the great bow of Varuṇa. The burning fire in the yajña gave birth to a male and a female child to Drupada, both of whom attained eminence. [“In the Vedic hymns, man fears gods, and imagines God. In the brāhmaṇas, man subdues the gods, and fears God. In the upaniṣads, man ignores the gods and becomes God.” – E W Hopkins, The Religion of India, p. 217].
Śiva and Viṣṇu are both Vedic deities; Śiva is perhaps just the peaceful manifestation of Rudra. Durgā and Skanda, his family members are also alluded to here and there. Viṣṇu, Nārāyaṇa, Bhagavān, Vāsudeva, Kṛṣṇa – all become one in the time of Mahābhārata. [“In the puranic times… three streams of religious thought, namely, the one flowing from Vishnu, the vedic god at its source, another from Nārāyaṇa, the cosmic and philosophic god and the third from Vāsudeva, the historical god mingled together decisively and thus formed the later Vaishnavism.” – R. G. Bhandarkar, Collected Works, Vol. IV: Vaishnavisam, Saivism and Minor Religious Systems, p. 49]