As pointed out by OP in a comment, this is a 2013 Czech book by Miroslav Žamboch, entitled Ve službách Klanu (which translates into In services of the clan if I am to believe this site on Czech literature).
All quotes below are courtesy of Google Translate.
Herbert Ducatti is a miner. Deep underground, active gems benefit from the wizard's clan. In the Northern Mountains, there is plenty of raw crystal deposits, but it is not easy to harvest - concentrated magic over a few hours burns the brain of every ordinary person. And if it dips deep enough, it's enough for that second. Only sorcerers can survive in the deep. But it's still not the worst ...
Active gems want all clans. And what they all want is usually fighting. Herbert Ducatti just wanted to survive ... At least initially.
This review by Martin Stručovský matches several of the plot points OP remembered.
The main hero and a couple of other guys digging out from a collapsed mine.
And if that's not enough, he [Herbert] and the rest of the party get stuck in the underground hill, where they have to wait for a few months for bare survival.
Main hero eventually going apeshit over said war and imbuing his body with previously mentioned magic stones.
And so, in fact, Ducatti's transformation and ascension begins. Because if he was before a man, then he returns to the surface and becomes something else. An inhuman, monster who implanted magical stones in his own survival.
Also he was betrayed by his country in the end, because they couldn't pay him or something like that.
A couple of reviews here and there mention the book dealing with "zrada" ("betrayal") but I couldn't find a specific quote about the character being betrayed by his country.