Let $H$ be a Hilbert space over $\mathbb R$ or $\mathbb C$ and $f\in B(H)$. I wonder if there is a $g\in B(H)$ such that $fg=gf^*$, where $f^*$ is the adjoint of $f$.
We know a matrix over a field is always conjugate to its transpose. Is there a generalization of this fact to Hilbert spaces?
Presumably you mean $g$ to be invertible, otherwise the statement is trivially true (take $g=0$).
The answer is no. For example, if $H$ is infinite-dimensional take $f \in B(H)$ to be an isomorphism from $H$ to an infinite-dimensional closed subspace of $H$. $f$ is one-to-one, but $f^*$ is not, so $f$ and $f^*$ are not conjugate.
For an explicit example of this, on $\ell^2$ take $f((x_1,x_2,x_3,\ldots)) = (x_1, 0, x_2, 0, x_3, \ldots)$.