And although the Democratic primary for mayor is more than a year away, Mr. Diaz seemed to be ceding ground to his rivals.

Since July, he has raised about $94,000, and has spent $102,000. Mr. Stringer, Mr. Johnson and Mr. Adams have each raised at least three times that amount, and have spent tens of thousands of dollars less. Mr. Diaz does have about $900,000 in his campaign war chest, but Mr. Adams and Mr. Stringer each have more than $2 million; Mr. Johnson has nearly $700,000.

Mr. Diaz said that he has eased off on fund-raising efforts as he wrestled with whether to proceed with a campaign.

“I cannot continue to pretend to folks, ask them for money, ask them to support me when after, really thinking about this and feeling it and doing soul-searching and speaking with my family, I know I’m not giving it 100 percent,” he said.

Mr. Diaz said he will return all donations that he has raised for this race, and hopes his supporters will rally around another candidate.

“I’m doing it now so my supporters have ample time to recalibrate on whatever they want to do in terms of other candidates,” Mr. Diaz said. “I’m at peace with it.”

Carl Heastie, the New York State Assembly speaker and a close friend of Mr. Diaz’s, said he was “disappointed” not to see the Bronx borough president become the next mayor. But, Mr. Heastie said, “I wasn’t surprised.”