As @DanielC Pointed out, Krein spaces are the main ingredient to generalise Wightman axioms to free gauge theories. There is a framework, which you might be looking for: the Strocchi Wightman framework. You can find a detailed description in chapter 7 of the following notes:
https://www-m5.ma.tum.de/foswiki/pub/M5/Allgemeines/WojciechDybalski/Notes-QFT41.pdf
If you are interested in physical motivation why Krein spaces are needed, I have written up a text, when I was taking QFT - however this gets only as far to motivate the Strocchi Wightman relativistic quantum mechanics framework. I did not go too deep into the functional analytic aspects, just the precise motivation why we have to introduce Krein spaces:
https://www.overleaf.com/read/gsdrrvzcbxrp