Sum of Characters of Discrete Finite Abelian Groups 
Consider a finite, abelian group $G$ with the discrete topology, and let $g\in G$. Then
  $$\sum_{\chi\in\widehat G}\chi\left(g\right)=\begin{cases}\left|G\right|&\text{if }g=e\text{, and}\\0&\text{otherwise,}
\end{cases}$$
  where $\widehat G$ is the Pontryagin dual of $G$.

I can show that
$$\sum_{\chi\in\widehat G}\chi\left(e\right)=\left|G\right|$$
by using the fact that $G\cong\widehat G$. However, how do I show the other case?
 A: First consider the case where $G$ is cyclic, $G \cong \mathbb{Z}/n\mathbb{Z}$. An element $\chi \in \widehat{G}$ is determined by its value on 1, and the value on 1 must be something of order dividing $n$, so $\chi(1)$ is an $n$th root of unity. That is, for each $n$th root of unity $\zeta_n$, there is exactly one homomorphism $\chi:\mathbb{Z}/n\mathbb{Z} \to S^1$, which takes 1 to $\zeta_n$. Let $\omega_n$ be a primitive $n$th root of unity. Then
$$
\sum_{\chi \in \widehat{G}} \chi(1) = \sum_{\chi \in \widehat{G}} \chi(1) = 1 + \omega + \omega^2 + \ldots + \omega^{n-1} = 0
$$
The fact that this sum is zero is well known (see https://en.wikipedia.org/wiki/Root_of_unity, section on Summation). More generally,
$$
\sum_{\chi \in \widehat{G}} \chi(g) = \sum_{\chi \in \widehat{G}} (\chi(1))^g = 1^g + \omega^g + \omega^{2g} + \ldots + \omega^{(n-1)g} = \sum_{k=0}^{n-1} (\omega^g)^k
$$
Let $d = \gcd(g,n)$. If $d =1$ then $\omega^g$ is also a primitive $n$th root of unity and this sum is the same as the previous one, so it is zero. If $\gcd(g,n) \neq 1$, then $\omega^g$ is a primitive $\frac{n}{d}$th root of unity, and the sum
$$
\sum_{k=0}^{n-1} (\omega^g)^k
$$
should split up into $d$ groups of sums of all $\frac nd$th roots of unity, each of which is zero, so this is again zero. 
Ok, we've proved the result in the case where $G$ is cyclic. We know that $G$ is a direct sum of cyclic groups, so we should be able to transfer this to the general case. I'm not sure how to do this right now. Perhaps the best way to do it is to incorporate it into the argument above, and tackle the general case all in one go.
