There are a lot of answers already, but I wanted to expand a little on them, because there are some holes in what has been said so far.
First point is that there is no United Kingdom law on defamation. The UK consists of essentially three jurisdictions:
- England and Wales
- Northern Ireland
In English common law, and I believe that of Ireland, defamation requires "publication" - that is that the defamatory statement is communicated by the defendant to someone other than the person complaining of the defamation. As you describe your case, that is the end of the matter.
In Scots law things were different. Per Mackay v M’Cankie (1883) 10 R 537, there was no need for publication to a third party. Since you did not say which part of the UK you were in, answers based on English law may not be enough.
However, very recently, under section 1 of the Defamation and Malicious Publication (Scotland) Act 2021, publication in Scotland also requires publication to a third party.
The second point that others have made is that "slander" and "libel" are historically different kinds of defamation. Slander is pretty much restricted to spoken defamation. A written notice (on paper or by email) would be libel.
Does this matter? For one thing it is more evidence that this is just bluster by your boss. But I think that's about it.
The English law distinction between the two was that under slander, the claimant had to prove damage, whereas under libel, no proof was necessary. But that is no longer true. Proof of damage is necessary for all defamation, indeed section 1 of the Defamation Act 2013 requires the claimant to prove "serious harm" or the likelihood of serious harm. The same is now true of Scotland under the 2021 Act.
Unless there is something you haven't told us about your notice, and you expressed yourself in language so extreme as to cause some form of mental injury to your boss, it is hard to see how a claim would or could be possible.
Finally, as others have said, if you resign because of awful treatment by your boss that may be treated as amounting to a dismissal and that may in turn be something you could claim for, depending on a lot more circumstances that go beyond this particular question and have to do with employment law. Most of that law is harmonised between Scotland, England and Wales under the same legislation, but Northern Ireland is different, though the similarities are enough to say at least what I said at the start of this paragraph.