The pole structure of the inhomogeneous multidimensional Epstein zeta function, E(N)m2 (s; a1,....a(N)) = SIGMA-n1 infinity,...,n(N) = 1 (a1 n1(2) + ... + a(N)n2N + m2)-s, is determined using heat-kernel techniques. The poles of E(N)m2 (s; a1,...,a(N)) are found to be s = N /2; (N - 1)/2;...;1/2; -(2l + 1)/2, l is-an-element-of N0. Furthermore, their residues and E(N)m2 (- p; a1,...,a(N)), p is-an-element-of N0, are given explicitly. These results are used to find the high-temperature expansion of the Helmoholtz free-energy of a massive spin-0 and spin-1/2 gas subject to Dirichlet boundary conditions on hypercuboids in a flat n-dimensional space-time.