Is this a criterion for continuity? Given a topological space $(X,\tau)$ and the product space $(X^2,\tau_2)$.
Define the diagonal $\Delta X^2=\{(x,x)\,|\,x\in X\}$ and a set
$\mathbf S_\tau=\{\mathcal A\in\tau_2|\Delta X^2\subseteq\mathcal A\}$.
Then $\mathbf S_\tau$ provides some kind of $\delta$-$\epsilon$ arrangement for the elements in $X$, since one can formulate conditions as $\forall\mathcal A\in\mathbf S: (x,y)\in \mathcal A$, which asserts that $(x,y)$ is "close to the diagonal" and therefore that $x$ "is close to" $y$.
Suppose $f:X\to X'$ is a function between topological spaces, then the question is
If
$\forall x\in \!X\,\forall \mathcal E'\!\in \mathbf S'\,\exists\mathcal D\in\mathbf
S\,\forall y\in \!X: [(x,y)\in\mathcal D\implies(f(x),f(y))\in\mathcal E']$
then $f$ is continuous?
If not, perhaps under the condition that the spaces $X,X'$ are Hausdorff?
 A: Given a subset of $A\subseteq X\times X$, let $A_x$ denote the slice
$$ A_x = \{ y\in Y \,|\, (x,y)\in A\}.$$
We have an embedding $i_x\colon X\to X\times X$ given by $y\mapsto(x,y)$, which allows us to express $A_x$ as $i_x^{-1}(A)$.
For $$\mathbf S = \left\{\, A\subseteq X\times X \,\middle|\, \text{$A$ is open, containing $\Delta$}\,\right\}$$
I claim that that $(A_x)_{A\in\mathbf S}$ are open sets in $X$ containing $x$ and provided $X$ is $T_1$, all open sets containing $x$ are of this kind. Let $A\in\mathbf S$, then $A_x=i_x^{-1}(A)$ is open, since $A$ is open, and $x\in A_x$, since $A$ contains the diagonal. Conversely, let $B\subseteq X$ be an open set containing $x$ and for every $z\neq x$ let $U_z$ be an open neighborhood of $z$ with $x\notin U_z$, then
$$
A = (B\times B) \cup \bigcup_{z\neq x} (U_z\times U_z)
$$
is open, contains the diagonal and satisfies $A_x=B$.
Since your statement boils down to
$$\;\forall x\in \!X\,\forall \mathcal E'\!\in \mathbf S'\,\exists\mathcal D\in\mathbf
S\colon \mathcal D_x \subseteq \mathcal f^{-1}(\mathcal E'_{f(x)}),$$
this becomes the neighborhood-definition of continuity, provided $X$ and $X'$ are $T_1$.
A: Assume that $X'$ is $T_1$. Suppose that $x\in X$, and $f(x)=y$, and let $U$ be any open nbhd of $y$ in $X'$. Then $$N'=(U\times U)\cup\big((X'\setminus\{y\})\times(X'\setminus\{y\})\big)$$ is an open nbhd of the diagonal in $X'\times X'$. By hypothesis there is an open nbhd $N$ of the diagonal in $X$ such that $\langle f(x),f(z)\rangle\in N'$ whenever $\langle x,z\rangle\in N$. Note that $\langle f(x),f(z)\rangle=\langle y,f(z)\rangle\in N'$ iff $f(z)\in U$. Let $V=\{z\in X:\langle x,z\rangle\in N\}$; $V$ is an open nbhd of $x$ in $X$, and $f[V]\subseteq U$. Thus, $f$ is continuous at $x$, and since $x\in X$ was arbitrary, $f$ is continuous.
Added: Note that every continuous function $f:X\to X'$ satisfies the condition. If $N'$ is an open nbhd of the diagonal in $X'\times X'$, and $f:X\to X'$ is continuous, then the function
$$g:X\times X\to X'\times X':\langle x,y\rangle\mapsto\langle f(x),f(y)\rangle$$
is continuous, so $N=g^{-1}[N]$ is an open nbhd of the diagonal in $X\times X$, and it’s clear that if $\langle x,y\rangle\in N$, then $\langle f(x),f(y)\rangle\in N'$. Thus, the condition is equivalent to continuity when $X'$ is $T_1$.
