Yes, you can use the emails. But make sure that you disclose them in discovery so that your wife will have a chance to object.
You can also use the emails to impeach her credibility - even if the Court rules that they are inadmissible. To play it safe, you should do this before trial by asking her about the subject matter / affair during her deposition. If she admits to the facts stated in the email, then their introduction at trial won't be as high a priority. If she does not, then you can confront her with the emails to impeach / challenge her credibility and can attach them as exhibits to the deposition. The lawyers can then fight over their admissibility in motions in limine before trial. Note that the Judge will then be made aware of the emails' content. It is very hard to unring the bell.
I had a case in which an opposing party illegally taped my client. We got the tape excluded, but could not deny its contents when asked under oath about what was said in the underlying conversation. Even excluded items can be used for impeachment purposes to challenge a party's truthfulness.
You can use emails but you are going to have to testify how you got them and that they are the real emails.
Arnold & Wadsworth