They are won through Jewel Crafter explorations. Each exploration, regardless of other rewards, always yields Tears of Shiva, one for each 100 gold spent. It can be also got from ransoming in Prison (50% chance) and some events.
Max stack: 99999
You will need an absolutely enormous amount of Tears of Shiva to completely upgrade all that you can use them for:
- 24,000 for Tower Talents
- 303,240 for maximum upgrade of all soldiers of all Heroes.
So you can treat them as effectively infinite. As there is no limit or cooldown for the Jewel Crafter, you can always convert gold to Tears of Shiva, and they will always be useful. You cannot, unfortunately, turn them back into gold.
As you cannot realistically max them out, the main thing you must consider is if the gold spent on them would be more useful in another place. See the Gold to BP ratio discussion to see how does it compare against burning Gold at the castle. See also augment (while your heroes have a 50% or higher chance of Augment with Gold, spending it there offers a better rate of Gold/BP).
The soldier upgrades have different costs depending on tier, but the Gold/BP ratio is always below 30. Many players overlook the BP provided by Advancing soldiers to the next tier, without which the Gold/BP ratio would always be 50 (with one exception). Upgrading soldiers only improves the PVP part of the game.
The optimal strategy is to keep your soldiers advanced only through the highest possible advance (not upgrade) given your Hero ranks (e.g. wait to make tier 1 upgrades until you will be able to advance to tier 2 at the end). Spend the rest of your tears on Tower Talents, saving only enough to efficiently upgrade your soldiers when you do improve a hero's rank.