SAN FRANCISCO — Just as soldiers become mentally deranged by the vibrations of explosives, so may dancers be affected by jazz music. This will be the defense of Dorothy Ellingson when she goes on trial for having killed her mother. The crime admitted by the girl, who described how she donned a gown and stepped over her mother's body to go to a dance, was the result of "jazzmentia," a new but very real disease, according to the attorneys. Their contention is that syncopated rythms can be like the incessant tapping on the forehead used to torture people in barbarous countries.