NEW YORK (AP) _ Geraldine Ferraro, the first woman ever to win a major party's vice presidential nomination, says she encountered ''bigotry and ... sexism'' during the campaign but that the hardships were worthwhile because her candidacy expanded opportunities for women.

In her book - ''Ferraro: My Story,'' to be published by Bantam Books in November - she recalled that on the night of her nomination, she, presidential contender Walter Mondale and their spouses toasted their prospects with champagne.

''There wasn't a cloud on my horizon,'' she wrote. ''What I didn't know then was the personal agony that lay ahead, an agony that at times would seem almost unbearable.''

Excerpts of the book about her campaign on the Democratic ticket were printed in the Oct. 7 issue of Newsweek.

''I wasn't prepared for the depth of the fury, the bigotry and the sexism my candidacy would unleash,'' she said.

She said the Italian-American community abandoned her during the campaign, and said the anti-abortion pickets who dogged her steps were ''vicious.''

Ms. Ferraro, a Catholic, called Cardinal John J. O'Connor of New York ''a single issue bishop'' who used ''an increasingly strident voice'' to criticize her position on abortion. She cited his pronouncement that he could not see how a Catholic could in good conscience vote for a supporter of legal abortion.

''That is not my church,'' she said.

The former congresswoman from Queens said her hardships were offset by the opportunities her candidacy opened for women like her two daughters, ''expanding their life options a thousandfold.''

Still, she recalled that her husband, John Zaccaro, was ''devastated'' and depressed by scrutiny and criticism of his financial dealings.

She said she incited the furor over her husband's tax returns by inadvertently approving a news release saying he would release them when he told her he would not. Eventually, the returns were made public.

Ms. Ferraro also said that during the campaign she began to bite her nails and eat ''almost compulsively'' because of the pressure.

She had actually asked not to be considered for the nomination, she said, when members of the Mondale staff criticized her anonymously in the press.

'''Please take my name out of consideration,' I told Mondale, 'I do not want to be part of this process anymore. I never really did want it,''' Ms. Ferraro wrote. ''But he refused,'' and promised that the criticism would stop.

In the end, Ms. Ferraro said, the Democratic campaign was probably doomed to failure. ''Short of a major disaster that he couldn't grin away or shrug off helplessly, (President) Reagan was virtually unbeatable,'' she said.