As suggested in a comment, it is a reference to the normal practice of putting injured horses out of their misery.
Gloria feels her life is hopeless and has attempted suicide in the past. During the dance marathon she becomes increasingly depressed - losing the will to live. She tells Robert that her life is hopeless and she would be better off dead.
Robert feels that killing her is the kind thing to do. Putting her out of her misery and saving her decades of further unhappiness.
So, when arrested, he doesn't attempt to deny the shooting. He simply makes the metaphorical connection to the practice with horses.