Sánchez said in a letter posted on his X account that while the allegations against his wife Begoña Gómez are false, he is cancelling his public agenda until Monday when he will announce whether he will continue or step down.
"I need to stop and reflect," Sánchez wrote.
"I must answer the question if it is worth it to continue, given the mud pit the right and far right have made out of our politics, if I must continue in front of the government or renounce that highest of honours."
Sánchez, 52, has been Spain's prime minister since 2018.
He was able to form a new progressive coalition government in November to start another four-year term.
He is one of Europe's longest serving Socialist leaders.
Earlier on Wednesday, a Spanish judge agreed to probe allegations of corruption made by a private group with a history of filing lawsuits mainly for conservative causes.
The court based in Madrid will consider the allegations and proceed with the investigation or toss it out.
Begoña Gómez, 49, does not hold public office and maintains a low political profile.
Manos Limpias, or "Clean Hands," accuses Gómez of allegedly having used her position to influence business deals.
The court did not provide further information and said that the probe was under seal.
Manos Limpias describes itself as a union but its main activity is a platform pursuing legal cases.
It acts as the "popular prosecution," a peculiarity of Spanish law that allows individuals or entities to take part in certain criminal cases even when they have not been directly harmed by the accused.
Justice Minister Félix Bolaños called the new allegations "false".