I want to solve for the density operator in the quantum Brownian motion master equation,
\begin{align} \begin{aligned} \frac{d\rho_S(t)}{dt}=&-\left(\frac{i}{\hbar}\right)\Big[H_S+\frac{1}{2}M\widetilde{\Omega}^2X^2,\rho_S(t)\Big]-i\gamma[X,[P,\rho_S(t)]_+]\\ &-D[X,[X,\rho_S(t)]]-f[X,[P,\rho_S(t)]]\,, \end{aligned} \end{align} where \begin{align} \begin{aligned} H_S&=\frac{1}{2M}P^2+\frac{1}{2}M\Omega^2X^2\,,\\ \widetilde{\Omega}^2&=\frac{2}{M\hbar}\int_0^{\infty}\eta(\tau)\cos(\Omega\tau)d\tau\,,\\ \gamma&=\frac{1}{M\Omega\hbar^2}\int_0^{\infty}\eta(\tau)\sin(\Omega\tau)d\tau\,,\\ D&=\frac{1}{\hbar^2}\int_0^{\infty}\nu(\tau)\cos(\Omega\tau)d\tau\,,\\ f&=-\frac{1}{M\Omega\hbar^2}\int_0^{\infty}\nu(\tau)\sin(\Omega\tau)d\tau\,. \end{aligned} \end{align}
The only operators are $X$ and $P$ - everything else is a constant. If I want to write this master equation in the momentum basis, I know that I need to sandwich both sides of the equation with $\langle{p}|$ and $|{p}\rangle$. If I just focus upon $\Big[H_S,\rho_S(t)\Big]$, ignoring constants, I have
\begin{align} \langle{p}|\Big[P^2+X^2,\rho_S(t)\Big]|p\rangle&=\Big[p^2+(i\hbar)^2\frac{d^2}{dp^2},\rho_S(p,t)\Big]\,,\\ &=\Big[(i\hbar)^2\frac{d^2}{dp^2},\rho_S(p,t)\Big]\,. \end{align} But now I'm not sure what to do. This final commutator gives me a derivative that's acting on nothing. How do I interpret this when solving for the density operator?
Since I am going to eventually solve for the density operator in the momentum basis, is there an easier way to do so than sandwiching both sides of the master equation with the bra and ket of the momentum?