Doctors say the 72-year-old entertainer's diagnosis was caused by a blood clot in his lungs.
The legendary tenor is expected to make a full recovery but will have to miss five performances scheduled for late July in the Spanish capital.
On Wednesday, the Three Tenors member posted a statement on his Facebook page: "I will be feeling much better soon. The saddest part of it all is being in my own city and unable to perform for Madrid's public."
The opera icon was advised to rest for three to four weeks. His return to the stage will depend on how quickly he regains his strength.
Domingo serves as general director of the Los Angeles Opera which issued a statement wishing him a full and speedy recovery.
The Associated Press contributed to this report.