The closest to any official notificaiton of death came from the company commander of the deceased, who by custom, though not by any official fiat of which I am aware, would write to the soldier's next of kin. But if the company commander was not available, or was not present at death (for instance, if the man died in a hospital), the best the family could hope for would be a letter from a friend or relative giving notice of the death. Some of these letters are very poignant, and the writer would try to comfort the family with any final words the daying man may supposedly have said (I suspect that soem of those "last words" may have been manufacutred to comofrt the fmaily). If there was a female nurse presnet, she would often clip a lock of the deceased's hair to send to the family.
If the letter was written by a comrade who buried the man on the field, he would sometimes give detailed directions on exactly where the body was buried, to allow those families with financial means to try to recover the body and bring it home. Obviously, though, this would be the exception, and not the rule, for in many instances, even where the Confederates held the field, the press of operations might prevent a man's friends from burying him, and he would then be buried by a burial party whose chief interest was to get the putritying bodies in the ground as quickly as possible. Being assigned to burial detail was perhaps the most distasteful job which could be assigned to a soldier following an engagement. Decomposition set in very quickly in the heat of the summer. The very explicit picture which Alan posted of the Confederate dead at Spotsylvania is undoubtedly of men who had just been killed; men who were out as long as 24 hours would normnally be horribly bloated and the features virtually unrecoginzable.