"To be green with jealousy" is not always lighthearted, indeed it usually indicates a serious and negative emotional involvement. Whebn there is a romantic triangle in popular song or fiction, in which A is in love with B, but B is attracted by C, A will often deeply resent the existence or supposed superior attractions of C. An outside, detached observer D might well say that A was green with jealousy of C. Nor is this limited to romantic envy. Consider an excerpt from "The Occasional Garden" by Saki.
"...That is why I am so furious with Gwenda Pottingdon, who has practically forced herself on me for lunch on Wednesday next; she heard me offer the Paulcote girl lunch if she was up shopping on that day, and, of course, she asked if she might come too. She is only coming to gloat over my bedraggled and flowerless borders and to sing the praises of her own detestably over-cultivated garden. I'm sick of being told that it's the envy of the neighbourhood; it's like everything else that belongs to her -- her car, her dinner-parties, even her headaches, they are all superlative; no one else ever had anything like them. When her eldest child was confirmed it was such a sensational event, according to her account of it, that one almost expected questions to be asked about it in the House of Commons, and now she's coming on purpose to stare at my few miserable pansies and the gaps in my sweet-pea border, and to give me a glowing, full-length description of the rare and sumptuous blooms in her rose-garden."
It mihht well be sais that the narrator here is green with envy of Gwenda Pottingdon indeed she is almost making herseld sick over it
However, that idiom does not, I think, really describe the situation suggested in the question.
Some other idioms for envy
Jealousy is also known as "the green-eyed monster".
One might say of the beauty who has excited envy in the other shepherds that "She makes them eat their hearts out".
One night say that the other shepherds have "set their hearts on" the beauty.