As per my knowledge, Vidura was the Prime Minister of the Hastinapur and resigned from the post as war was decided. After the end of war, Yudhishthira appointed him as Prime Minister. But I've never heard about details of Vidura death. When and how he died?
Vidura's death is described in the Asramavasika Parva of the Mahabharata. After the war, Vidura along with his half-brother Dhritarashtra and his sisters-in-law Gandhari and Kunti retire into the forests. One day, Yudhisthira meets Vidura and the latter using his Yogic powers enters into the body of Yudhisthira, leaving behind his own body:
"Vaisampayana continued, 'Thus addressed, Dhritarashtra answered king Yudhishthira, saying,--'O son. Vidura is well. He is performing austere penances, subsisting on air alone, for he abstains from all other food. He is emaciated and his arteries and nerves have become visible. Sometimes he is seen in this empty forest by Brahmanas.' While Dhritarashtra was saying this Vidura was seen at a distance. He had matted locks on his head, and gravels in his mouth, and was exceedingly emaciated. He was perfectly naked. His body was besmeared all over with filth, and with the dust of various wild flowers. When Kshattri was beheld from a distance, the fact was reported to Yudhishthira. Vidura suddenly stopped, O king, casting his eyes towards the retreat (and seeing it peopled by so many individuals). King Yudhishthira pursued him alone, as he ran and entered the deep forest, sometimes not seen by the pursuer. He said aloud, 'O Vidura, O Vidura, I am king Yudhishthira, thy favourite!'--Exclaiming thus, Yudhishthira, with great exertion, followed Vidura. That foremost of intelligent men, viz., Vidura, having reached a solitary spot in the forest, stood still, leaning against a tree. He was exceedingly emaciated. He retained only the shape of a human being (all his characteristic features having totally disappeared). Yudhishthira of great intelligence recognised him, however, (in spite of such change). Standing before him, Yudhishthira addressed him, saying, 'I am Yudhishthira!' Indeed, worshipping Vidura properly, Yudhishthira said these words in the hearing of Vidura. Meanwhile Vidura eyed the king with a steadfast gaze. Casting his gaze thus on the king, he stood motionless in Yoga. Possessed of great intelligence, he then (by his Yoga-power) entered the body of Yudhishthira, limb by limb. He united his life-breaths with the king's life-breaths, and his senses with the king's senses. Verify, with the aid of Yoga-power, Vidura, blazing with energy, thus entered the body of king Yudhishthira the just. Meanwhile, the body of Vidura continued to lean against the tree, with eyes fixed in a steadfast gaze. The king soon saw that life had fled out of it. At the same time, he felt that he himself had become stronger than before and that he had acquired many additional virtues and accomplishments. Possessed of great learning and energy, O monarch, Pandu's son, king Yudhishthira the just, then recollected his own state before his birth among men. Endued with mighty energy, he had heard of Yoga practice from Vyasa. King Yudhishthira the just, possessed of great learning, became desirous of doing the last rites to the body of Vidura, and wished to cremate it duly. An invisible voice was then heard,--saying,--'O king, this body that belonged to him called Vidura should not be cremated. In him is thy body also. He is the eternal deity of Righteousness. Those regions of felicity which are known by the name of Santanika will be his, O Bharata. He was an observer of the duties of Yatis. Thou shouldst not, O scorcher of foes, grieve for him at all. Thus addressed, king Yudhishthira the just, returned from that spot, and represented everything unto the royal son of Vichitraviryya. At this, that king of great splendour, all these men, and Bhimasena and others, became filled with wonder. Hearing what had happened, king Dhritarashtra became pleased and then, addressing the son of Dharma. said,--'Do thou accept from me these gifts of water and roots and fruits. It has been said, O king, that one's guest should take that which one takes oneself.' Thus addressed, Dharma's son answered the king, saying,--'So be it.' The mighty-armed king ate the fruits and roots which the monarch gave him. Then they all spread their beds under a tree and passed that night thus, having eaten fruits and roots and drunk the water that the old king had given them."' (Section XXVI, Asramavasika Parva, Mahabharata)