Borehole Bazaar (A Vow Unbroken) by Kendra Namednil
Bugbears are a communal race traditionally associated with evil and with a deep hatred for elves. In order to teach their young, however, they keep samples of their enemies as pets. Enter Ptielieren, a relatively young adult elf, who learns how to survive in a hostile culture even as every moral he once held is stripped from him through a series of cyclically recurring abuses.
Through painful trial and error, Ptielieren discovers that fighting against his enemies is not a valid tactic and gets him nowhere. He is positioned such that running away, too, is not viable.
To find success, he must become strong enough in his sense of self to find peace and to find enough common ground with his enemies to sculpt them toward a better, stronger, more nurturing and accepting future. This, the first in the series, lays the foundation of the fundamental shifts he seeks to imprint, even as he forsakes what he thought it was to be an elf.