We know that the definition of the momentum operator $\hat{P_x}$ in an state space $\mathcal{E}$ is:
$$\hat{P_x}|\psi\rangle=P_x|\psi\rangle$$
where $P_x \in \mathbb{R}$. However we also know that the representation of $\hat{P_x}$ in the position basis $\{|\vec{r}\rangle\}$ is: $$ \hat{P_x}\to \frac{\hbar}{i}\frac{\partial}{\partial x}, \tag{1} $$
Now, my question is: Is $\frac{\hbar}{i}\frac{\partial}{\partial x}$ still an operator or is it an eigenvalue?
From what I gather I could also write (1) as:
$$ \frac{\hbar}{i}\frac{\partial}{\partial x}\psi(\vec{r})=P_x\psi(\vec{r}) $$
keeping $P_x \in \mathbb{R}$. My doubts get even worse when I define an operator like this:
$$ \hat{A}=\hat{X}+\hat{P}_x $$
Then I could write:
$$ \hat{A} |\psi \rangle=a|\psi \rangle $$
where $a$ is the eigenvalue of $\hat{A}$. But in this case $a=x+P_x$ where $x$ is the eigenvalue of the operator $\hat{X}$. Suppose I wanto to go to the position basis. Then I could write:
$$ \bigg(x+\frac{\hbar}{i}\frac{\partial}{\partial x}\bigg)\psi(\vec{r})=a\psi(\vec{r})=(x+P_x)\psi(\vec{r}) $$
from my reasoning the x on the left hand side is to be interpreted as an operator and on the right hand side as a number, but how can this be? This doesn't seem to make sense to me either way, that doesn't seem to be an "equation". What is this representation in position basis? Is it still an operator or is it the eigenvalue?