Given that Epicurus died of gallstones (and given that my wife and I recently learned that passing gallstones carries the risk of tearing the bile duct of your pancreas, leading to jaundice, sepsis, necrosis, organ failure, and death), I have to believe that the last week of Epicurus was largely spent managing excruciating pain, and, knowing that organ pain is comparable to childbirth, or getting shot, and knowing that even mild opiates barely manage organ pain, and that there is an entire medical discipline devoted to pain management, there is absolutely no way that my soul would entertain spending a week in a dying body suffering from organ failure. It is categorically excruciating, and while his Epistle To Idomeneus may be inspiring, I am convinced that dying of complications from stones is utterly horrific.
(I also have a new perspective and respect for his students: watching someone go through that is traumatic).
The anonymous shepherd may not have developed the same intellectual tools that would allow him to compose a beautiful reflection during the peak of pain due to a medically-remarkable illness, but the diversity of his pleasure is so much greater than Epicurus', I have to go with the shepherd. Epicurus may have enjoyed the maximum amount of pleasure that was available to him, which might have meant some relief through alcohol (though I have my doubts, knowing how much worse my wife would have been if she had been a drinker), a warm bath, and calm faces, but the shepherd is not physically immobile, nor is he forced to face the threat of immanent death. Perhaps if Epicurus had a bad heart and died in his sleep, but ... gallstones? Absolutely not. His physical condition was too dangerous.