I'm assuming you're combining E=hf and E=mc². The problem is that E=mc² doesn't apply to photons.
The general equation is E² = (pc)² + (mc²)² where p is the momentum. For a photon, E=pc; m=0 by geometry.
The problem with your analysis is that the principle of relativity prevents you from constructing--or even envisioning--a frame that is comoving with a photon. Light moves at speed c in all inertial frames; the moment you say that you are in an inertial frame, you are saying that light is moving at c with respect to you. Even in the limiting process where you approach the speed of light, the speed of light with respect to you does not go to zero. It remains fixed at c. Light itself does not have an inertial frame.
Question: But can't we envision being an observer photon moving alongside another photon?
There you go again ... making me think. This one isn't going to go down easy. But I'll work on it.