Background
Suppose that $(X,\mathscr{A},\mu)$ is an arbitrary measure space, that $p$ satisfies $1\leq p<+\infty$, and that $q$ is defined by $\frac{1}{p}+\frac{1}{q}=1$. Let $g$ belong to $\mathscr{L}^q(X,\mathscr{A},\mu)$. Then $fg$ is integrable whenever $f$ belongs to $\mathscr{L}^p(X,\mathscr{A},\mu)$ (by Hölder's inequality), and so the formula\begin{align*} T_g(f) = \int fgd\mu\end{align*}defines a linear functional $T_g$ on $\mathscr{L}^p(X,\mathscr{A},\mu)$.
Denote $T$ the map from $\mathscr{L}^q(X,\mathscr{A},\mu)$ to $\left(L^p(X,\mathscr{A},\mu)\right)^*$ that takes the function $g$ to the functional $T_g$ defined above.
My Question
Now, it is clear that if $g_1$ and $g_2$ are equal almost everywhere, then $T_{g_1}=T_{g_2}$. However, the book I am reading pointed out that, in case $q=+\infty$, we have if $g_1$ and $g_2$ are equal locally almost everywhere then $T_{g_1}=T_{g_2}$. I want to prove this claim, but got stuck.
My Attempt So Far
I want to consider first the case when $fg_1$ and $fg_2$ are nonnegative. Let $A=\{x\in X:(fg_1)(x) \neq (fg_2)(x)\}$. Let $h$ be the function defined by\begin{align*}h(x)=\begin{cases}+\infty\quad &\text{if $x\in A$},\\0\quad &\text{if $x\neq A$}.\end{cases}\end{align*}Define $\{h_n\}$ by $h_n=n\chi_{A}$. Then $h(x)=\lim_{n\to\infty}h_n(x)$ for all $x\in X$. So $\int hd\mu = \lim_{n\to\infty}\int h_nd\mu$
I got stuck here. What I wanted to do (but failed so far) is to show that $\int hd\mu=0$. Then in view of $fg_1\leq fg_2+h$, this would imply that $\int fg_1d\mu\leq\int fg_2d\mu + \int hd\mu = \int fg_2d\mu$. Then analogously, $\int fg_2d\mu\leq\int fg_1d\mu$, and we would have been done.
Could someone please help me out? Thank you very much in advance!
A property holds locally$\mu$-almost everywhere if the set of points at which it fails to hold is locally$\mu$-null.
A set $N$ is called locally $\mu$-null if for each set $A$ that belongs to $\mathscr{A}$ and satisfies $\mu(A)<+\infty$ the set $A\bigcap N$ is $\mu$-null.