Is the language $\{f(x)\mid \mbox{$x$ is the code of a machine accepting $f(x)$}\}$ recursively enumerable and undecidable?
Using formal notations rather than words would make your life easier. Since you have a
binary encoding of  Turing Machines (TM), you should use a formal
notation for it.

For example you can give it a name, say $g$. Then an encoding $x$ of a
TM $M$ can be written $x=g(M)$, or if you want to use the common angle
bracket notation: $x=\langle_g M\rangle_g$. Note that I keep $g$ as a
subscript of the angle brackets, so that I can distinguish different
binary encodings of Turing Machines.

Now, if $g$ is a binary encoding scheme for TMs, then its composition
$h=f\circ g$ with a bijective and computable function $f$ (from binary
numbers to binary numbers) is also a binary encoding scheme for TMs,
such that (using the various possible notations) $h(M)=f(g(M))=\langle_h M\rangle_h=f(\langle_g M\rangle_g)$.

Now you can rewrite the definition of $L$ using this new binary
encoding scheme:
.$$\begin{align}
L&amp;=\{f(x)\mid \mbox{$x$ is an encoding of a machine that accepts $f(x)$}\}\\
&amp;=\{f(x)\mid \mbox{$x=\langle_g M\rangle_g$ and $M$ accepts $f(\langle_g M\rangle_g)$}\} \\
&amp;=\{f(\langle_g M\rangle_g)\mid \mbox{$M$ accepts $f(\langle_g M\rangle_g)$}\}\\
&amp;=\{\langle_h M\rangle_h\mid \mbox{$M$ accepts $\langle_h M\rangle_h$}\}
\end{align}$$

It is now easy to see that L is recursively enumerable, since for any
value $x$, we can test whether it is in $L$ by running the machine $M$
such that $x=\langle_h M\rangle_h$ with input $x$, which does
terminate when $x\in L$.

However, $L$ is not decidable. The proof goes by contradiction.
We first suppose that $L$ is decidable. Thus its complement $\overline
L$ is also decidable, and is recognized by a Turing machine $\overline
M$

If $\overline M$ accepts $\langle_h \overline M\rangle_h$, then
$\langle_h \overline M\rangle_h$ is in $\overline L$, the language
that $\overline M$ recognizes by definition. But this implies, by definition of
$\overline L$ that $\overline M$ does not accept $\langle_h \overline
M\rangle_h$.

But if $\overline M$ does not accept $\langle_h \overline M\rangle_h$,
then $\langle_h\overline M\rangle_h\notin L$ by definition of $L$. Thus $\langle_h\overline
M\rangle_h\in\overline L$. Hence since $\overline M$ recognizes
$\overline L$,  $\overline M$ must accept $\langle_h \overline
M\rangle_h$.

In both cases we have a contradiction. So the hypothesis that $L$ is
decidable cannot hold.