I want to formulate a set $K$ with the set-builder notation, but I am not sure if I am "allowed" to use a function, $m$, as a predicate without explicitly defining the function.
I want to accomplish the following: Given two sets $A$ and $B$, I want to define set $K$ in way that members of $K$ are also members of either set $A$ or $B$, provided that the function $m$ of $k$ evaluates to $e$, where $k \in K$ and $e \in E$. Furthermore, the "inner workings" of $m$ are irrelevant, it only matters that $m$ maps members of $K$ to members of $E$.
I tried to formulate it as follows:
Suppose $m: K \rightarrow E$ and $e \in E$, then $K$ is:
$K = \{x \in (A \cup B)\ :\ e = m(x)\}$
Since "$m(x)$ is defined for each $x\in A\cup B$", then the domain of $m$ must be $A\cup B$ (or some superset like $A\cup B\cup C$).
Since "$m(x)$ may either evaluate to $\{\}$ or [some] $e\in E$" and "$e\in E$ is not fixed", then the codomain of $m$ must contain at least the element $\{\}$ (which is a little odd**) and also all of $E$. So maybe the codomain is $\{\{\}\}\cup E$, or something larger.
Once you've set up your domain and codomain (e.g. "$m:A\cup B\to F$", where $A,B,F$ have been defined previously) then there's no circular reference and you can just define $K=\{x\in A\cup B\mid m(x)\in E\}$.
If the domain is only $A\cap B$, this $K$ is the "preimage" or "inverse image" of $E$ under $m$, sometimes written $m^{-1}(E)$ or $m^{-1}[E]$ or (very rarely) $m^{<}(E)$. If the domain of $m$ is bigger than $A\cup B$, then you want $m^{-1}[E]\cap \left(A\cup B\right)$.
**
If by $\{\}$ you didn't mean the empty set in particular, but just meant things not in $E$, then the codomain would just be some relevant superset of $E$.
If by $\{\}$ you didn't really care about it being the empty set in particular and just wanted to represent a sort of failure of the function to be defined, then you may want to read about partial functions.