Interpretation of lemma: $f\in L^{1}_{loc}(\Omega)\ st\ \int f\phi=0\: \forall\phi\in\mathcal{D}(\Omega)\ \Rightarrow f=0\ in\ L^{1}_{loc}(\Omega)$

As in the title, consider the following lemma in the theory of distributions:
$$f\in L^{1}_{loc}(\Omega)\;\;\text{ s.t. }\int f\phi=0\quad \forall\phi\in\mathcal{D}(\Omega)\ \implies f=0\;\text{ in }\; L^{1}_{loc}(\Omega)$$
where $$\mathcal{D}(\Omega)$$ is the space of compactly supported $$C^{\infty}$$ functions, also known as test functions.

The proof I know is based on mollifiers and convolution: the result follows by the uniform convergence of the regularized $$f_\epsilon=f\ast\rho_\epsilon$$ to $$f$$, as $$\epsilon\rightarrow 0$$ where $$\rho_\epsilon$$ are a family of mollifiers.

Now, we can see the same result written as $$\langle f,\phi\rangle=0\; \forall\phi\in\mathcal{D}(\Omega)\ \Rightarrow\ f=0\ in\ L^1_{loc}(\Omega)$$ where we view $$f$$ as an element of the dual $$\mathcal{D}'(\Omega)$$. This may be interpreted as $$f\in\mathcal{D}(\Omega)^{\perp}\subset\mathcal{D}'(\Omega)\ \Rightarrow f=0$$.
If we where in a (seprable) Hilbert space, where the inner product allows us to 'internalize' the notion of dual (through Riesz theorem) and as a consequence that of orthogonal (as the most natural one) this consition is known to be necessary and sufficient for the set we are treating to be a orthogonal basis.

I wonder if:

• we can have an analogous in this case (maybe through the notion of density of $$\mathcal{D}(\Omega)$$ in $$L^1$$ ?) where the setting is that of general Topological Vector Spaces
• It is in general possible to define and charachterize a subspace $$M\subset E$$ such that $$f\in E\ st\ \langle f,\phi\rangle =0\ \forall\phi\in M\ \Rightarrow f=0\ \in E'$$
• If yes, can we in some sense think of M as a ''basis''? More in general are there relevant generalization of the concept in arbitary TVS?

You can use in general this fact:

For each space $$Y$$ the diagonal $$\Delta$$ is closed if and only if $$Y$$ is Hausdorff. So you have the following criteria to estabilish when two continuos function $$f,g: X\to Y$$ must be equal:

If $$f$$ and $$g$$ coincides on a dense set of $$X$$, then $$f=g$$.

In our case we have that the linear map

$$\langle f, \cdot \rangle: V\to \mathbb{R}$$

is a countinuos map with respect the topology induced by the metric induced by the scalar product on $$V$$ so if the map is zero on a subset $$A$$ dense on $$V$$ then the map is zero on all $$V$$.

In your first case you have that $$D(\Omega)$$ is dense in $$L_{loc}^1(\Omega)$$ by theory of mollifiers, so if the scalar product is zero on $$D(\Omega)$$ then is zero on all $$L_{loc}^1(\Omega)$$

So if $$M$$ is dense on $$E$$ then you have your result. I don’t know if it is also a necessary condition on $$M$$ to have your property.