I would suggest that you resign if you can clearly see how YOU would force a win (if the situation were reversed), and if the opponent has already demonstrated that he is at least as good a player as you are.
Different strokes for different folks, though.
New player here at live chess (online and overtheboard) and wondering about whether or not one should resign an obviously losing position or play it to the bitter end in the hope that the strong position either fails to checkmate and possibly lose on time or creates a stalemate... ? is there an ethical rule of thumb which is expected to be respected ? Thanks for help.