Derivation of $E=pc$ for a massless particle? In classical mechanics, massless particles don't exist because for $m=0$, $p=0$.
The relativistic relation between energy, mass and spatial momentum is: $E^2= (pc)^2 + (mc^2)^2$ . So it is said that setting $m=0$ in the first equation you get $E=pc$.
How could setting $m=0$ in that equation give you $E=pc$ whilst $p$ appears in the equation and we know $p=γmu$? If you set $m=0$ you will have indeterminacy due to "$γm$". It seems to me like we are doing a "trick" in order to get the $E=pc$. Perhaps there is another proof for this relation?
 A: Keep in mind that the equation
$$
E^2 = p^2c^2 + m^2c^4
$$
is derived from the relations
$$
\begin{align}
E = \gamma mc^2,\qquad p = \gamma m v. \tag{1}
\end{align}
$$
Therefore
$$
p = E\frac{v}{c^2}.\tag{2}
$$
Although (1) is only defined for massive particles, it turns out that (2) remains valid when $v=c$, i.e. for massless particles. Indeed, we get
$$
E= pc,
$$
which is consistent with electromagnetism and quantum physics.
A: The definition of momentum isn't $\gamma m \dot x$. The proper definition of momentum is that it is the generator of translations. Then you find that for massive representations of the Lorentz group (~timelike curves), $p = m \gamma \dot x$, while for massless representations (~lightlike curves), $p$ is arbitrary, as long as $E = pc$. 
Another way of looking at it is that for particles moving on timelike curves, the derivative with respect to proper time is a covariant quantity, because proper time is invariant. But for lightlike curves, there is no proper time. There are affine parameters that are analogous but there are infinitely many of them and none is privileged, so this doesn't give a unique definition of momentum. 
A: The relation (setting $c = 1$)
$$
E^2 = m^2 + p^2
$$
is more fundamental than $E = \gamma m c^2$ and $p = \gamma m v$.
The former arises naturally as a primary constraint from varying the action
$$
S = -m \int \sqrt{\dot{x}^\mu \eta_{\mu \nu} \dot{x}^\nu} \, d\lambda
$$
The latter expressions only arise when you choose the parametrization $\lambda = t$.
A: If one considers that the deBroglie relationship holds for photons we have $$p=\frac{h}{\lambda} = \frac{hf}{c} = \frac{E}{c}$$
which immediately gives us $$E=pc.$$
This is consistent with the Lorentz invariant energy four-vector magnitude which yields  the mass of a particle: $$ mc^2=\sqrt{E^2-(pc)^2}=0.$$
A: For all particles, $p^{\mu}=(E,\vec{p})$ and $p^{\mu}p_{\mu}\equiv m^2$ (using the mostly-minus metric). Thus $E=\pm \sqrt{m^2+|\vec p|^2}$. If you set $m^2=0$, you get $E=\pm |\vec p|$. The non-trivial aspect of these definitions is that $E$ is to be literally identified as the energy, and $\vec p$ as the spatial momentum (so in the classical limit $E=p^2/2m + \textrm{const.}$ ).
For massive particles with positive-energy ($m^2>0$, $E>0$), the 4-momentum and 4-velocity are related by the equation
$$p^{\mu}=m\,u^{\mu}$$
whereas for massless particles with positive-energy ($m^2=0$, $E>0$), the relationship between the 4-momentum and 4-velocity is given by:
$$p^{\mu}=E\,u^{\mu}$$
where $u^{\mu}$ is a light-cone vector.
