Yes there is a lot of energy being emitted by the Sun - solar wind, gamma rays, ... but I don't think it's a good idea to go into orbit to collect it.
The problem with solar energy is not one of "getting enough energy per unit area". The problem is "efficiently collecting energy so it can be used". Here "efficient" includes things like longevity. The radiation environment in space is BRUTAL: we are protected by the magnetic field of the Earth (for charged particles) and the atmosphere (for gamma) - without these, all life on Earth would fry. The same is true for most electronics - it would not take long for your gamma-energy collector to degrade. See for example this article.
The second problem is "getting the energy to Earth". It's expensive to collect energy in outer space and then sending it down.
The final problem is "putting your collector up there, and keeping it there". Launching any electronics into space is very expensive. Keeping it in orbit is expensive too - and forget about doing any maintenance.
Incidentally - your figure "2 million times more" is energy per gamma ray: but if you consider the Sun a black body radiator, the number of gamma rays is very much smaller than the number of visible light photons. That makes your idea not nearly as attractive as you think it is...
The energy distribution is given by Planck's law. Plotting it for a black body at 5777 K (roughly the surface of the Sun) you can see the relative intensity from the far UV on is much smaller than the intensity in the visible range:
I didn't even go all the way to the gamma end of the scale...
Of course the heart of the Sun is at higher temperatures and will contribute more gamma rays - but the relative flux is just not that big.