A 33-year-old off-duty officer in the Bronx accidentally shot himself when a group of four men allegedly jumped him.