The 33-year-old has won 30 Tour de France stages, four behind the record held by Belgium's Eddy Merckx.
His Team Dimension Data squad announced his enforced rest on Wednesday. Cavendish was also diagnosed with Epstein-Barr virus in April 2017.
Cavendish last won a Tour stage in 2016 and was eliminated from this year's race after missing the time limit on the mountainous 11th stage in the Alps.
He said: "I've been advised to take a period of total rest in order to fully recover."
Team Dimension Data said Cavendish had been "unknowingly training and racing with EBV over recent months".
The Manxman was first diagnosed with the virus, which is an illness associated with fever, sore throat, swollen lymph nodes in the neck, and sometimes an enlarged spleen, in April 2017.
"This season I've not felt physically myself and despite showing good numbers on the bike I have felt that there's been something not right," Cavendish said.
"Given this and on the back of these medical results, I'm glad to now finally have some clarity as to why I haven't been able to perform at my optimum level during this time.
"I'm now looking forward to taking the time necessary in order to get back to 100 per cent fitness before then returning to racing again at peak physical condition."
Cavendish experienced disappointment in 2017, crashing out of the 2017 Tour sustaining a shoulder injury.
Following his elimination from this year's Tour, he had been scheduled to ride for Great Britain earlier this month at the European Championships in Glasgow. However, he withdrew on "medical advice".
It is unlikely the 2011 world champion would have been in the Great Britain team for September's Road World Championships in Innsbruck, Austria, due to the mountainous nature of the course.
The event usually marks the end of the season and now Cavendish can take his time to recover for 2019.