Tennis superstar Victoria Azerenka is furious a judge has given her a real-life Sophie's choice  -- tennis or her kid -- that is making her drop out the US open. 

The former #1 player in the world is locked in a nasty dispute with Billy McKeague -- the father of her 8-month-old son, Leo. The two split back in July.

Here's the problem ... McKeague filed custody papers in L.A. (where Victoria has a home) and the case has gone to a judge who told Azerenka she's not allowed to take the child out of California while the custody trial rages ... and it's not going to end until October at the earliest. 

The dilemma -- the US Open kicks off August 28 in New York. Victoria will not leave her child -- whom she's been breastfeeding until a month ago -- with McKeague because she doesn't believe he's capable of caring for the kid.  

Her attorney, "Disso Queen" Laura Wasser, told the judge her client is more than willing to buy a plane ticket for McKeague and put him up in a hotel for the 2-week tournament, but the judge said no.

Wasser also told the judge her client already has a valid custody order from Belarus, the country where Victoria, Leo and and Billy are all residents, so it should be game, set, match. But for some reason the judge won't defer to the Belarus court.