I agree that the meaning can differ according to trade or industry and the words are not "terms of art".
I suggest the following general distincions can be made:
A guarantee implies that you will perform the contract if the party you are guaranteeing defaults.
An indemnity only implies that you will make good any losses suffered by the party you have agreed to indemnify.
An undertaking is simply an agreement to do something and it need not necessarily include any consideration on the part of the party to whom it is given. Generally it will be given as part of a larger transaction or in the course of court proceedings. In England undertakings are regularly given by property lawyers that they will, for example, discharge a mortgage or incumbrance on a property or account to a bank with the proceeds of sale.