Let $X$ be a locally convex space, $T$ a balanced convex compact set in $X$, and $f:X\to\mathbb{C}$ a linear functional which is (not necessarily continuous on $X$, but) continuous on $T$. It is not difficult to show that then for each $\varepsilon>0$ there exists a linear continuous functional $f^\varepsilon:X\to\mathbb{C}$ such that $$ \sup_{x\in T}|f(x)-f^\varepsilon(x)|<\varepsilon. $$
Question:
Is the same true if in addition we require that $f$ belongs to the polar $B^\circ$ of a barrel $B$ in $X$, and we want $f^\varepsilon$ to belong to $B^\circ$ as well?
I.e. we take a linear functional $f:X\to\mathbb{C}$ which is continuous on $T$, and bounded by 1 on some barrel $B\subseteq X$, $$ \sup_{x\in B}|f(x)|\le 1, $$ and for a given $\varepsilon>0$ we want to find a linear continuous functional $f^\varepsilon:X\to\mathbb{C}$ such that $$ \sup_{x\in B}|f^\varepsilon(x)|\le 1, $$ and $$ \sup_{x\in T}|f(x)-f^\varepsilon(x)|<\varepsilon. $$ Is it possible?