Large encapsulated bubbles have recently been described for use in abating low-frequency anthropogenic underwater noise [J. Acoust. Soc. Am. 130, 3325-3332 (2011)], and the use of encapsulation allows for the possibility of bubbles that are nonspherical in their equilibrium state. For the purpose of more accurately determining such bubbles' resonance frequencies, a lumped-element model of the linear oscillation of an ideal, arbitrarily shaped gas bubble in an incompressible liquid is presented. The corresponding boundary-value problem required to predict the resonance frequency of the bubble is seen to be equivalent to a classic problem in electrostatics [J. Acoust. Soc. Am. 25, 536-537 (1953)]. Predictions made for the resonance frequency of prolate and oblate spheroidal bubbles using this model are tested against a finite-element model of the full acoustic scattering problem. Particular attention is then paid to the case of an ideal toroidal bubble of arbitrary thickness, and predictions made for the resonance frequency of such a bubble using the lumped-element approach are compared to a finite-element model of the full acoustic scattering problem as well as to existing approximate models for the dynamics of thin toroidal bubbles. [Work supported by AdBm Technologies, LLC and the ARL:UT McKinney Fellowship in Acoustics.]