A Death in Paradise star was almost forced to seek medical attention after suffering an emergency while filming.