Reduce undecidable language to decidable language?
... but then $A_{\mathrm{TM}}$ would be decidable!


No. Because your $f$ is not computable since one cannot compute whether $M$ accepts $w$, as Yuval Filmus said in the comment.