A regular election for the Treasurer's post is to be held in 1988, and Mr. Casey has been sparring with leaders of the Republican-controlled State Senate over interim appointment. A two-thirds vote of the Senate is necessary for confirmation.

Mr. Casey is said to want to appoint a strong Democrat who could run for a full term as Treasurer next year, thus widening Democratic influence at the top of the state government. Republican Senate leaders say the voters elected a Republican and are entitled to a Republican serving out the term.

Some compromise is expected since Mr. Casey is trying to win Senate cooperation for his programs, including an economic development plan. The Governor's office had no immediate comment on Mr. Dwyer's request that his wife be appointed. A Resignation Was Expected

All political speculation faded, however, at least for the time being, after what happened at the news conference. Governor Casey said in a statement that he and his wife ''are profoundly shocked and saddened,'' and that ''Mrs. Dwyer and her children are in our prayers.'' Mr. Dwyer leaves two children, Rob and Deedee.

Capitol reporters had thought Mr. Dwyer had called the news conference to announce his resignation.

At the conference, according to some who attended it, Mr. Dwyer made a long, rambling statement. He criticized Acting United States Attorney James West, who prosecuted him; former Governor Thornburgh, with whom he had been at odds, and Federal District Judge Malcolm Muir, who presided at his trial. 'A Crime I Did Not Commit'

Mr. Dywer said the judge had a history of imposing ''medieval sentences.'' He said he was ''being punished for a crime I did not commit.''

And he urged that the death penalty be repealed, saying that what had happened to him made him certain that innocent people had been convicted and executed. He apologized for voting several times as a state legislator for the death penalty.