If your employer tells you that if you don’t resign you will be dismissed, your resignation may well amount in law to a dismissal. By contrast, if you face a genuine if unattractive choice between resignation and disciplinary action followed by possible dismissal, your resignation is unlikely to be a dismissal. Instead, it is much more likely to be viewed as a voluntary termination. Without a dismissal, you will not be able to bring a successful claim against your employer for unfair dismissal.
In any event, this issue is very rarely clear cut, and an employer faced with defending a claim for unfair dismissal will probably argue vigorously that you were not dismissed, and that instead you left voluntarily. If a tribunal agrees with the employer, your unfair dismissal claim will fail.
If you decide not to resign, this will at least place the responsibility on your employer to act fairly and to have reasonable grounds for your dismissal.