Former England seamer Matthew Hoggard has announced that he will retire from first-class cricket at the end of the season.