So the other answers have focused on intra-terminal time. I'll point out that once you take that into account, you'll have what, 3-4 hours outside the terminal, to be safe.
We can improve this by getting you to checkin BEFORE you leave the terminal. So exit immigration, go around to your departures terminal and check in - luggage if you have any, and so on. Then head off. Worst case you'll lose your flight and they'll chuck your luggage off the plane, right? ;)
Now you COULD take the express to Paddington and then as you say, anything is close. You could also do something outside London.
For example, Kew Gardens is reachable by tube, and you could spend a couple of hours there if the weather is nice.
But otherwise, from Paddington it's 30 minutes to Wimbledon tennis stadium if you'd like to see something else outside central London - but beware, one tube stoppage and you may be struggling to get back.
Odds are you're safer doing something in central London, as you then have several speedy-ish options for getting back to Heathrow.
Make sure to pick up an Oyster card either at Heathrow or at Paddington, as it'll make your tube journeys less expensive.
You can also buy an Express train ticket online, which I gather saves you some money over buying it on the train. And get a return, again saving you some time.
There's also bag storage at Heathrow, but if you checkin before you go, you won't have to worry about your bags, and it'll save you time and money :)