What makes any human lose the will to live?
"Grief or Weariness"
That's a quote, from "Laws and Customs of the Eldar" (emphasis mine):
[S]ome feär in grief or weariness gave up hope, and turning away from life relinquished their bodies, even though these might have been healed or were indeed unhurt. Few of these latter desired to be re-born, not at least until they had been long in 'waiting'; some never returned.
History of Middle-earth X Morgoth's Ring Part 3: "The Later Quenta Silmarillion" Chapter 2: "The Second Phase" Laws and Customs Among the Eldar
Yes, it is entirely possible for an Elf to "feel an emotion that makes them not want to live anymore." We have very few examples of an Elf choosing this path, but we can see it in the few examples we do have:
Lúthien was grieved by the death of Beren, and by the prospect of living an eternity without him:
[T]he spirit of Lúthien fell down into darkness, and at the last it fled
The Silmarillion III Quenta Silmarillion Chapter 20: "Of Beren and Lúthien"
Míriel passed so much of her strength into Fëanorthat she had none left for herself, and life itself became wearying:
[I]n the bearing of her son Míriel was consumed in spirit and body; and after his birth she yearned for release from the labours of living. And when she had named him, she said to Finwë: 'Never again shall I bear child; for strength that would have nourished the life of many has gone forth into Fëanor.'
The Silmarillion III Quenta Silmarillion Chapter 8: "Of Fëanor and the Unchaining of Melkor"
It's worth noting here that the Elves believe (correctly, as it turns out) that childbearing takes a physical and spiritual toll on them; the soul of the unborn child "feeds" off the soul of the mother. In Míriel's case, Fëanor just took too much out of her, she couldn't go on living.
Although she doesn't actually give up the will to live, Elrond's wife Celebrian is an interesting example of an Elf who undergoes a particular trauma:
In 2509 Celebrían wife of Elrond was journeying to Lórien when she was waylaid in the Redhorn Pass, and her escort being scattered by the sudden assault of the Orcs, she was seized and carried off. She was pursued and rescued by Elladan and Elrohir, but not before she had suffered torment and had received a poisoned wound. She was brought back to Imladris, and though healed in body by Elrond, lost all delight in Middle-earth, and the next year went to the Havens and passed over Sea.
Return of the King Appendix A "Annals of the Kings and Rulers" Part 1: "The Númenórean Kings" (iii) Eriador, Arnor, and the Heirs of Isildur The North-Kingdom and the Dúnedain
The exact circumstances of her trauma are unclear1, but it serves to demonstrate that Elves are susceptible to mental ailments as a result of trauma.
We might imagine, though there are no examples I can think of, an Elf undergoing an even more extreme trauma, and being so grieved that they choose to die rather than going on living with it.
1 Though there has been much speculation I am emphatically not linking to