Fermi's Golden Rule and Density of States I know Fermi's Golden Rule in the form
$$\Gamma_{fi} ~=~ \sum_{f}\frac{2\pi}{\hbar}\delta (E_f - E_i)|M_{fi}|^2$$
where $\Gamma_{fi}$ is the probability transition rate, $M_{fi}$ are the transition matrix elements.
I'm struggling to do a derivation based on the density of states. I know that under certain circumstances it's a good approximation to replace $\sum_f$ with $\int_F \rho(E_f) \textrm{d}E_f$ to calculate the transition probability, for some energy range $F$. 
Doing this calculation I obtain
$$\Gamma_{fi} ~=~ \int \rho(E_f) \frac{2\pi}{\hbar}\delta (E_f - E_i) |M_{fi}|^2\textrm{d}E_f.$$
Now assuming that the $M_{fi}$ are constant in the energy range under the integral we get
$$\Gamma_{fi} ~=~ \rho(E_i) \frac{2\pi}{\hbar} |M_{fi}|^2.$$
Now this is absolutely not what is written anywhere else. Other sources pull the $\rho(E_f)$ out of the integral to obtain Fermi's Golden Rule of the form
$$\Gamma_{fi} ~=~ \rho(E_f) \frac{2\pi}{\hbar} |M_{fi}|^2$$
for any $f$ with $E_f$ in $F$ which makes much more physical sense. But why is what I've done wrong? If anything it should be more precise, because I have actually done the integral! Where have I missed something?
 A: I) Well, OP evidently knows that it is the density $\rho_f(E_f)$ of final (rather than initial) states that appear in Fermi's golden rule
$$\tag{1}  \Gamma_{fi} ~=~ \rho_f(E_f) \frac{2\pi}{\hbar} |W_{fi}|^2.$$
Here we adorn the density $\rho_f$ with a subscript $f$, to make that point clear, following a suggestion by MarkWayne. Instead it seems that OP's actual question is: 

Must the energy $E_f$ [which here denotes a pertinent average of final states that we summed over in a sufficiently small energy interval, and which appears inside $\rho_f(E_f)$ in eq. (1)] approximately match the energy $E_i$ of the initial state $i$, or not?

II) A crucial role is played by the time-dependence of the interaction potential $V(t)$ in the Hamiltonian 
$$\tag{2} H~=~H_0+V(t).$$ 
For instance, in the harmonic perturbation [1], the interaction potential reads
$$\tag{3} V(t)~=~\sum_{\pm}W^{\pm} e^{\pm\mathrm{i}\Omega t}, $$
where $\Omega$ is the angular frequency of absorption/stimulated emission. (We need at least two terms in the potential (3) to make the interaction operator $V(t)$ Hermitian.) One may show that this favors transitions of the form
$$\tag{4} E_f~\approx~E_i\pm\hbar\Omega.$$
So in the harmonic perturbation, $\rho_f(E_f)$ and $\rho_f(E_i)$ are in general different. 
III) However, in the derivations of Fermi's golden rule in many elementary textbooks (which always use time-dependent perturbation theory), the interaction term $V(t)$ is often treated  as time-independent (corresponding to $\Omega=0$). This means that the initial and final state in such time-independent treatments must have approximately the same energy, cf. also a comment by Lubos Motl. 
For more information, see e.g. also this Phys.SE answer. 
References:


*

*J.J. Sakurai, Modern Quantum Mechanics, 1994, Section 5.6.

A: As proposed by Lubos, the delta function you started with $\delta(E_i-E_f)$ forces the final result to be invariant by $E_i \leftrightarrow E_f$.
A: While the answers above already answered your question, I would like to recommend a paper by myself:  Nonsmooth and level-resolved dynamics illustrated with a periodically driven tight binding model. 
In this paper, we derived Fermi golden rule as a by-product. Our derivation does not use the delta function. 
I believe our derivation is much simpler and more transparent than those in textbooks. It is just a mathematical property of the sinc function. 
