I tried to derive a relation of the light-matter interaction Hamiltonian in vacuum and a medium that is characterized by a linear real refractive index but I am not sure if the following is correct or if this approach is valid at all. My result is given in a boxed equation at the bottom but I thought it is sensible to show my approach instead of simply asking whether the result is correct.
The time averaged (over 1 period) energy density $u$ of a electromagnetic wave in a homogenous medium characterized by its permittivity $\varepsilon=\varepsilon_r\varepsilon_0$ is
$$ u = \frac{1}{2}\varepsilon |E_0|^2 $$ where the electric field was assumed to be $\vec E(r,t)=E_0\cos(\vec k\cdot \vec r-\omega t)\hat e$.
Let the electric field amplitude be connected to the vector potential via $$ \vec E(r,t) = -\frac{\partial }{\partial t} \vec A(r,t) $$ Asuming for the vector potential the form $\vec A(r,t) = -A_0\sin(kr-\omega t)\hat e$, we obtain for the amplitudes the relation $ E_0 = \omega A_0. $ Inserting this int the expressoin for the energy density yields $$ u=\frac{1}{2}\varepsilon\omega ^2|A_0|^2 $$ Now we connect this equation to the an expression for the energy density based on $N$ quantized photons in Volume $V$, $$ u = N\frac{\hbar \omega}{V} =\frac{1}{2}\varepsilon\omega ^2|A_0|^2 $$ and rearrange for $A_0$, $$ A_0 = \sqrt \frac{2N\hbar }{V\omega \varepsilon} $$
Now I want to establish a dependency on the refractive index. We have $$n^2 = \varepsilon_r\mu_r$$. We assume that $\mu_r \approx 1$ such that $$ n^2\approx \varepsilon_r $$
Inserting this into the equation via $\varepsilon = \varepsilon_r \varepsilon_0$ for the vector potential amplitude yields, $$ A_0 = \sqrt \frac{2N\hbar }{V\omega \varepsilon_0} \cdot \frac{1}{n} $$
Can I conclude from this the following equations for the light-matter interaction Hamiltonian $$\boxed{\begin{aligned} \hat V_{medium} \propto \frac{e}{m} \hat p\cdot A_{medium} &= \frac{e}{m} \hat p\cdot A_{vac} \frac{1}{n}\\ \approx -\hat \mu \cdot E_{medium} &= - \frac{1}{n} \hat \mu \cdot E_{vac} \end{aligned}}$$
where the second line is the light-matter interaction Hamiltonian within common approximations typically used when describing the interaction of molecules with electromagnetic waves.
This is a follow up question to this.