And he said he expects to pitch again soon after that.
"It's going to take me down for a while but not out for good," said Davis, who spoke at a news conference after facing the Colorado Rockies in a Chase Field exhibition Friday night.
"I know I'm not going through this alone," Davis, 32, said. "I know I've got all the help in the world, and I'm definitely optimistic of the outcome."
Davis left after 2 2/3 innings, allowing eight runs and nine hits, including four home runs. He struck out five.
The Chase Field crowd of 24,663 gave Davis an ovation as he walked off the mound.
Davis did not attribute his poor outing to his diagnosis. "I really didn't think about it at all," Davis said. "Believe it or not, I really thought I was executing pitches, and it just felt like everything got hit out of the park. It was just one of those days, I guess."
Davis said that pitching helps keep his mind off his illness.
"Maybe I'll spend more time more time watching tape and figure out what I did wrong today," Davis said with a chuckle.
Doctors discovered a lump in Davis' throat during a routine physical on Feb. 6, Davis said. On Wednesday, biopsy results revealed it to be cancerous.
Davis will have his thyroid gland removed and is expected to be out of the hospital the day after the operation, Diamondbacks head physician Dr. Michael Lee said.
Lee said the team doesn't have a projected return date for Davis but said it could be within four to six weeks.
"We're extremely optimistic," Lee said. "This is a bump in the road for Doug, but we see him being with us the rest of the season. It's just a matter of when that will happen."
Davis said his mother also had thyroid cancer and made a full recovery.
After talking with doctors, Davis asked to keep pitching until his operation. The club said Davis, the team's No. 3 starter, would make his regular starts on April 3 at Cincinnati and against the Los Angeles Dodgers on April 8.
Davis called manager Bob Melvin with word that he had cancer, then began lobbying to stay in the rotation.
"As I'm trying to grasp this news, he's trying to talk me into his next start," Melvin said. "A pretty courageous guy. Obviously, once he digested all this, he got past that and was thinking about what he could do for his team."
Melvin said the Diamondbacks were "shocked" by the news.
"I had a tough time getting by it," Melvin said. "I spent all day yesterday having a tough time focusing on baseball. I was thinking about Doug all day long, as were all our teammates."
An extended absence by Davis could be a considerable blow for the defending NL West champions, who have built their success on stalwart pitching. Arizona will start the season without lefty Randy Johnson, who is recovering from back surgery.
Davis went 13-12 with a 4.25 ERA and pitched 192 2-3 innings last season, his first with Arizona. Davis is 75-75 with a 4.34 ERA in nine seasons.
Davis' spot in the rotation will likely be taken by right-hander Edgar Gonzalez.
Davis agreed to meet with reporters after the game to discuss his illness, but he seemed uncomfortable being in the spotlight.
"I think the focus should be on the D-backs and this upcoming season," Davis said. "This could happen to anybody. Just because it happened to a baseball player, it's a big media thing. I think that we should keep the focus on winning ballgames and keeping a strong team, a healthy team out there. They'll have somebody to take my place while I'm down for a while."