The creature will remain a bat, even after it dies...
... ASSUMING you can do it in the first place. While a bat does have a CR of 0, we don't know what the CR of a tiny servant is. According to this Twitter question and answer, they don't have ANY challenge rating, but this is not official. I have not found anything about it in the Sage Advice Compendium, either.
But, assuming you can,
True Polymorph (emphasis mine):
You transform the creature into a different creature, the creature into an object, or the object into a creature
Just from this statement alone, there's nothing preventing you from transforming the tiny servant (a creature) into a bat permanently. Even after the 8 hours, when the tankard would normally go back to being an object, the spell says that it works on turning objects into creatures, so it's still not contradictory.
And according to this text:
The transformation lasts for the duration, or until the target drops to 0 hit points or dies. If you concentrate on this spell for the full duration, the transformation lasts until it is dispelled.
Since death is not a form of dispelling, it will remain a bat unless you dispell it first. (The corpse of the bat may or may not be able to be dispelled)
Situations where this may not work
These are situations with true polymorph that would cause the target to no longer be valid, and we don't necessarily know what would happen. (per @Medix2 in the comments, This is discussed a bit here: "Is a spell suppressed or removed when the target temporarily becomes invalid?")
- Let's assume that instead of a bat, you change the tankard into a ball. true polymorph doesn't let you transform an object into another object, causing the target to no longer become valid. The ball may stay a ball, since it was valid before the tiny servant spell wore off, but it may revert.
- To keep it on track of morphing into 'B' words, let's morph it into a baboon instead. We're continuing the assumption that we're allowed to transform into CR 0 creatures. But, a baboon is a small creature while the tiny servant is, well, tiny. In true polymorph, emphasis mine:
You can turn an object into any kind of creature, as long as the creature's size is no larger than the object's size.
So, after 8 hours, the baboon will be too large, causing it to no longer be valid. Again, it may continue to be a baboon after 8 hours, since it was valid at the time of casting, but we don't know.