Chicago's mayoral contest, mere chaos until this week, is suddenly utter pandemonium. Incumbent Jane Byrne, defeated in the Democratic primary, announced Wednesday that she will undertake a write-in campaign for reelection.

The obvious target of the Byrne bombshell is Rep. Harold Washington, whose victory in the Feb. 22 primary sparked hopes that he would become the city's first black mayor. But the most immediate victim is likely to be Republican candidate Bernard Epton, who has lost his chief, perhaps his only, major asset: being the only white candidate in a decidedly race-conscious city.

Until the Byrne announcement, Epton could hope that his race would carry him to victory in a city where only one member of the 50-member city council is a Republican; where only a tiny minority of the 1.6 million registered voters are Republicans.

Washington, who says the Byrne write-in will improve his own chances, acknowledges that race is still a critical factor in the contest.

Outside Chicago, the impression is abroad that Washington, whose primary victory over incumbent Byrne and the son of the legendary Dick Daley, took political observers by surprise, is making the mistake of running a race-centered campaign in a city where blacks are only about a third of the electorate.

The impression is misleading. "Harold is making a special effort to touch all segments of the city," his campaign press secretary, Grayson Mitchell, told me two days before the Byrne announcement. He cited that day's campaign schedule as a case in point: an early-morning appearance at the Standard Club, an organization whose members include influential Jewish leaders; a stop at Gage Park, where Martin Luther King was stoned in 1968; an appearance before the Firefighters Union; calls on the International Trade and Economic Development Commission and the Chicago Alliance of Business; a series of "el" stops on the mostly white northwest side of town; an evening visit to an up-scale housing development on the lakefront.

But didn't Washington say he wouldn't "grovel" for white support? "The groveling statement had to do with seeking endorsements of the top Democratic politicians who have withheld their support," Mitchell explained. "He is taking the position that he refuses to 'crawl through the street,' as he put it, to beg endorsements" from people like Rep. Dan Rostenkowski and such prominent Cook County Democrats as council members Ed Vrdolyak and Edmond Burke. "The reason for the primary is to decide on the party's flagbearer," says Mitchell. "No further endorsement should be necessary."

Still, Mitchell acknowledges, the April 12 contest promises to be excruciatingly close "because the race issue has cut across such issues as qualifications, experience and competency."

The problem, exacerbated by Chicago's celebrated racial attitudes, is that Washington came out of nowhere, as far as white Chicagoans are concerned, said Mitchell. "The only black politicians they knew were machine politicians, and Harold bolted the party more than 10 years ago. And since they don't know him, they tend to look at his candidacy not in terms of his platform and his philosophy but in terms of his race. They see him primarily as a black candidate, not as the embodiment of a referendum on Reagan's policies, as he would like."

Washington's staff doesn't like to talk about it, but one of the things that strikes fear in the hearts of white Chicagoans is the closeness of Operation PUSH president Jesse L. Jackson to the campaign. They are afraid that Jackson would be too influential in a Washington administration, a fear Washington has worked at dispelling.

But gently. For Washington is forced to acknowledge that Jackson was at least as much an asset in the primary as he is a liability in the general election. "Probably the best thing Jesse could do for Harold," one Washington supporter said, "is to spend more time out of town these next few weeks."

Given Byrne's provocative reentry and Jackson's love of the limelight, that might not be easy to arrange.