This narrative comes from Douglas Freeman Southall's volumes R.E. Lee.
In the midst of the battle, when the whole army had been wrestling with the blue thousands that had streamed over the parapets, a messenger had arrived with news of Stuart's movements to head off Sheridan's raid before it reached Richmond. Spurring their worn mounts, the anxious Southern troopers had intercepted the Federals at Yellow Tavern, seven miles north of Richmond and had given battle there. Stuart himself, as always, had been in the fullest of the fight, and, just as the Unionists had turned off to try to force a way into Richmond by some less-contested route, he had been shot through the body by a dismounted blue cavalryman. That had been on the afternoon of the 11th. The wounded Stuart had been borne into Richmond, and, when the dispatch was sent Lee, was believed to be dying.
Stuart dying! The "eyes of the army" about to be destroyed. It was the worst calamity that had befallen the South since that May day, just a year previously, when "Stonewall" had breathed his last. Lee was surrounded by a number of young officers when he finished reading the dispatch, and he had to steel himself as he announced the news. "General Stuart," he said, as he folded up the paper, "has been mortally wounded: a most valuable and able officer." He paused a moment and then he added in a shaken voice, "He never brought me a piece of false information." Later in the night, while the battle had still been frenzied, another message brought the dreaded word: With the cheerful composure that had marked all his acts, Stuart had died after 8 P.M.that evening. Lee put his hands over his face to conceal his emotion, as he heard that his great lieutenant was dead, dead in the crisis of his beloved army's life, dead at the age of thirty-one and before the fullness of his powers had been realized. As quickly as he could, Lee retired to his tent to master his grief, and when one of Stuart's staff officers entered, a little later, to tell him of Stuart's last minutes, Lee could only say, "I can scarcely think of him without weeping!" To Mrs. Lee he wrote, "A more zealous, ardent, brave and devoted soldier than Stuart the Confederacy cannot have."
Here is Lee’s announcement of Stuart’s death taken from the Official Records.
General Orders No. 44
Headquarters, Army of Northern Virginia
May 20, 1864
The commanding general announces to be the army with heartfelt sorrow the death of Major General J.E.B. Stuart, late commander of the Cavalry Corps of the Army of Northern Virginia. Among the gallant soldiers who have fallen in the war, General Stuart was second to none in valor,in zeal, and in unfaltering devotion to his country. His achievements form a conspicuous part of the history of this army, with which his name and serve will be forever associated. To military capacity of a higher order and all the nobler virtues of the soldier he added the brigher graces of a pure life, grounded and sustained bythe Christian’s faith and hope. The mysterious hand of an Allwise God has removed him from the scene of his usefulness and fame. His grateful countrymen will mourn his loss and cherish his memory. To his comrades in arms he has left the proud recollections of his deeds, and the inspiring influence of his example.
This concludes the series covering Jackson's and Stuart's woundings and deaths.