Mr. McCarthy, who was ousted from his position as speaker in October, announced he will be resigning from Congress at the end of this month.