The first sentence should be this:
'It's raining heavily, so I will stay at home and eat whatever I've got in the fridge.'
Note the capital 'I' at the beginning - yes, this is important - and the word 'the' before 'fridge'. 'Fridge' is a singular, countable noun, so it needs a determiner before it. You could also say 'my fridge'.
The most interesting part of this sentence, when you convert it into indirect speech, is what happens to the modal 'will'. It doesn't change to 'would', as you might think. In fact, this use of 'will', in direct speech, is an expression of a decision being made at that moment. So the best way to put it into indirect speech is like this:
It was raining, so I decided to stay at home and eat whatever I'd got in the fridge.
And yes, it is possible to say 'I had got' or 'I'd got' in the past, but it would be more common, and also more widely acceptable - especially in US English - to say '..whatever I had in the fridge.'
I hope that helps.