I did something similar to the OP a couple of years back, BHX-DUB-JFK.
The connection was however only about 90 mins. On arrival I noticed the departures boards were telling passengers on my flight to go through immigration, but this seemed a bit OTT. I stuck my head into the Gold Circle lounge and they said I should take a seat and they would call the flight.
This was timed to perfection - as soon as the flight was called I left the lounge, and the moment I cleared the TSA security check, they announced boarding was underway.