Following the method developed by Waldspurger and Beuzart-Plessis in their proof of the local Gan-Gross-Prasad conjecture, we prove a local trace formula for the Ginzburg-Rallis model. By applying this trace formula, we prove the multiplicity one theorem for the Ginzburg-Rallis model over the tempered Vogan L-packets. In some cases, we also prove the epsilon dichotomy conjecture which gives a relation between the multiplicity and the exterior cube epsilon factor. This is a sequel work of [Wan15] in which we proved the geometric side of the trace formula.