When to Give your Life
Other Mitzvos versus the Big Three
Big Three
One should choose death rather than violate one of the three cardinal averos: murder. adultery, or idolatry.
All others
But for other mitzvos, even an important one such as Shabbos, if we are threatened by a goy who wants us to cook on Shabbos, let’s say, then it is better to violate the mitzvah, rather than lose our life.
Public Torah threat
But there is an exception; that is, when the goy is coercing us not for his own personal benefit, but with the express intention of making Jews keep Torah observance, and the coercion is carried out in the presence of 10 Jews, then we must give our life, for any mitzvah, even if it is not one of the Big Three.