This is a tricky situation. While under normal circumstances disclosing your illness would be not acceptable at all, we are not in times that can be classified as normal and covid is not run of the mill medical problem either.
A few hours later, the CEO sent an e-mail to the whole firm about my
situation, giving my name and the 2 other people's names, without my
consent. He was asking people to be careful and respect the safety
protocols.
While certainly your boss should've obtained your consent before sending out this email, I can understand why he did act on it this way instead. Namely most of the guidelines offered are around how important it is for people to isolate when possibly exposed to covid in order prevent further spread, and while it is great that you have reached out to everyone you remember being in contact with it is never going to be a complete list, where that mass email this will reach out to everyone, including those you may have forgotten about.
It's not without precedent either, while confidentiality about medical issues is important, sometimes protecting others takes over. See HCPC website for example of that for the UK. While I cannot read minds, I am sure that what the CEO was worried about is further spred so that's why he did what he did, and did not intend you any harm.
It is far from perfect, I cannot express enough how I dislike the fact that he did not reach out for your consent ahead of time, but now it's water under the bridge as we don't have time machines to go back in time.
Should I do something about it ?
Depends on what exactly do you want to achieve.
If you want to get an apology from the CEO, I would shoot him a short email thanking for his concern and highlighting the issue to all of the employees, but also mentioning that he should've asked you first before naming you. Maybe add that you would've given that consent, though that may come out as passive-aggressive if worded incorrectly.
If you want something tangible benefits, like a financial gain, hire a lawyer and see what they have to say, though I wouldn't keep my hopes up, as this will for sure cost you any future with the company and I can't imagine how this could possibly net you any sensible windfall. But then I am not expert on French law, ask a lawyer if you are really keen on exploring this.
And most importantly take all the rest you need and get well soon enough!