I think the story you are looking for is The Darfsteller written by Walter M. Miller, Jr. in 1955- the winner of the first Hugo Award for Best Novelette.
Taken from a review of the story:
Taking its title probably from the German word "darsteller," which
means "actor," Walter M. Miller's novelette The Darfsteller is about a
failed actor's return to the stage. Miller's story is about the effect
of technological innovation on the psychology of professionals, and it
is a winner.
Ryan "Thorny" Thornier was at one point in the past one of those
actors who you see all the time on the cover of People and Us
Magazines. He and his lady-friend, Mela seemed to be more image that
substance, but during their run they held the world as their oyster.
Then along came a company called Smithfield and everything changed.
Smithfield had invented a way to animate "dolls" and project lines and
emotional reactions into them through a machine called the Maestro.
The dolls effect was a little flat, but they were realistic enough to
convince theater owners to fire their actors and invest in
Smithfield's product. Thorny's fortunes fell virtually overnight,
while Mela embraced the technology and licensed her image to
Smithfield. Mela retired as a young woman to a life of luxury and
Thorny became a janitor at a seedy theater so he could stay close to
his art. As the years passed Thorny became bitter, until he eventually
decided to commit suicide. To do it he sabotaged the theater's
production of a play called The Anarch by ruining the tape that
controlled one of the characters. Thorny planned to wait until the
last minute after the producers realized their problem, then offer his
services reluctantly to step into the role, which was one of the last
ones he had before his career ended, and which he was best known for.
At the end of the play was a scene where his character shot one of the
other characters, then a third came in and shot him. Thorny switched
the prop gun for a real one with two bullets in it. He wanted to go
out in a bloody spectacle that would be talked about for years. But
once Thorny enters the stage he begins to feel like his younger self
again. The Maestro was a very complex machine that monitored audience
reaction and in the true spirit of pandering was capable of changing
the play mid-stream to suit the audience's desires. Once Thorny came
onto the stage the Maestro read the audience's displeasure with him
and tried to write him out of the last two acts. But Thorny outwitted
the machine and in the latter parts of the play realized that he did
not really want to die. His old flame Mela showed up also as a special
appearance, because her image was being used on one of the dolls. Once
she saw what Thorny was up to she decided that she wanted to act again