The Dirac measure as a weak limit of $L^2$ functions on a LCA group. Let $K$ be a locally compact abelian group. In the proof of Proposition 2 (the proposition does not matter for my question) of this blog-post, Tao writes:

$K$ comes with an invariant probability measure $\nu$. The theory of Fourier analysis on compact abelian groups then says that $L^2(K,\nu)$ is spanned by an (orthonormal) basis of characters $\chi$. In particular, the Dirac mass at $0$ (the group identity of $K$) can be expressed as the weak limit of finite linear combinations of such characters.

I do not fully follow the above comment. I know that the characters form an othornomal basis for $L^2(K, \nu)$. However, I do not follow what is meant by "the Dirac mass at $0$ can be expressed as a weak limit of finite linear combinations of such characters."
In the dicussion thread on the blog-post Tao explains that:

Here I am using the Haar measure $\nu$ to identify locally integrable functions on $K$ with distributions (which in particular allows one to view elements of $L^2(K,\nu)$, such as linear combinations of characters, as distributions).

I am not very familiar with distribution theory, but I think what is being said here is that if $\hat K$ is the set of characters, then for any $f\in L^2(K, \nu)$ we get a map $\hat f:\hat K\to \mathbb C$ taking $\chi$ to $\int_Kf\bar \chi\ d\nu$, and one can recover $f$ from this map since the characters form an orthonormal basis. Please correct me if I am wrong.
Next he says

Using approximations to the identity, one can express the Dirac distribution as the weak limit of elements of $L^2(K)$ (e.g., one can take $\frac{1}{\nu(U)} 1_U$ where $U$ are a shrinking set of neighbourhoods of the identity)...

I am quite lost here. The Dirac distribution is not a function but a measure. So I do not see how a weak limit of funcitons be equal to the Dirac measure.
Can somebody please clarify hings. Thank you.
 A: Let $X$ be a topological space with a Borel measure $\mu$. (I don't intend to work in the greatest generality - if the ideas here need to be generalized they will do so in a straightforward manner.) Any locally integrable function $f:X\to\mathbb{C}$ defines a linear functional $T_f$ on $C_c(X)$, the space of continuous, compactly supported functions on $X$, by integration:
$$
T_f:C_c(X)\to\mathbb{C}:\varphi \mapsto T_f(\varphi) = \int_X \varphi f ~d\mu.
$$
Under the right conditions and an appropriate choice of topology for $C_c(X)$, this linear functional is continuous, and the space of distributions is the space of continuous linear functionals on $C_c(X)$. The point is that many distributions, though not all of them, arise in this fashion. I don't want to get into this in detail, as it's a bit of a long subject, and all I can do is recommend that you read some distribution theory at some point.
Now, in the special case of an LCA group $K$ with Haar measure, the characters $\chi$ of $K$ are locally integrable functions, and by the above prescription they define a distribution:
$$
T_\chi:C_c(K)\to\mathbb{C}:\varphi\mapsto\int_K \varphi\chi~d\mu.
$$
Since the characters form an orthonormal basis of $L^2(K)$, you can then try to formally define distributions corresponding to elements of $L^2(K)$ by taking limits: if $f = \sum_i a_i\chi_I\in L^2(K)$, then you can formally attempt to define
$$
T_f:C_c(K)\to\mathbb{C}:\varphi\mapsto \sum_i a_i\int_K \varphi\chi_i~d\mu,
$$
where the rightmost expression is interpreted as a series limit. Again, you can do some work to show that $T_f$ is continuous, and therefore any $f\in L^2(K)$ induces a distribution $T_f$ on $C_c(K)$.
By similar arguments, any locally integrable function $f$ induces a measure $f~d\mu$ by integration against test functions, and this map from functions to measures can be extended continuously to $L^2(K)$ by the Cauchy-Schwarz inequality. (Edit: This boils down to the Riesz representation theorem for measures, aka the Riesz-Markov-Kakutani representation theorem.)
One can carry this procedure further to define the Dirac delta as a weak $L^2$ limit of finite linear combinations of characters. First, the Dirac delta is a weak $L^2$ limit of approximate identities. Approximate identities are elements of $L^2(K)$, and element of $L^2(K)$ are strong $L^2$ limits of finite linear combinations of characters.
One thing that seems to be confusing you: you say that "The Dirac distribution is not a function but a measure. So I do not see how a weak limit of functions be equal to the Dirac measure." The claim is not that this weak limit of approximate identities converges in $L^2(K)$, but in the larger space of measures. The approximate identity (lets say $\phi_\epsilon$ to be concrete), being a sequence of elements of $L^2(K)$, induces a sequence of measures $\phi_\epsilon~d\mu$ defined through integration. One can show that this sequence of measures, which is contained in the set of probability measures (since approximate identities integrate to $1$), converges weakly in the sense of measures to the Dirac measure (also a probability measure). To understand this you should look up something called the vague topology; the convergence occurs in this topology. (It's just weak convergence and Banach-Alaoglu in the context of spaces of bounded measures.)
But the approximate identities are themselves elements of $L^2(K)$, and hence they are in fact strong $L^2$ limits of finite sums of characters of $K$. Each finite sum of characters, being a locally integrable function, induces a (signed complex) measure on $K$ as above. So using that approximate identities (or, more precisely, the measures they induce) converge in the sense of measures to the Dirac measure, and that they are in turn limits of finite sums of characters (which induce their own measures), one can extract a sequence of finite sums of characters whose induced measures converge weakly to the Dirac measure in the vague topology.
