I sent a valid signed e mail a few weeks ago. Now I reinstalled everything on my computer (including the OS).
Is the certificate now invalid?
As schroeder said, we need more information to provide a satisfying answer.
I assume that your problem is about not being able to check email signatures anymore.
If the certificate didn't expire during these few weeks, there is no reason for it to be invalid now. A certificate is not linked to a given installation. However, you may have lost your certificate and its private key if you don't have any copy. From what you said, your mail client seems not to be able to check the email signatures; probably because it does not have access to the certificate or does not trust it.
To resolve this issue, you should take a look at the error message given by your mail client. Ensure that your certificate and the actors of the trust chain are present in the cert store of your mail client or your system.
Note that I am only talking about being able to check signature of emails you sent before reinstalling your system.