Another way of attack: After substitution y = -1+[Pi] Tan[x] the integral is
NIntegrate[Pi/(E^y^2*(Pi^2 + (1 + y)^2)), {y, -1, Infinity}]
(* 0.454151*)
Inserting
Integrate[Exp[(-(Pi^2 + (1 + y)^2))*z], {z, 0, Infinity}]
and exchanging integration variables the form is
(Pi^(3/2)/2)*
NIntegrate[(1 + Erf[1/Sqrt[1 + z]])/(E^(z*(Pi^2 + 1/(1 + z)))*
Sqrt[1 + z]), {z, 0, Infinity}]
which after another substitution x = (1+z)^-1/2 gets to
Pi^(3/2)*
NIntegrate[E^(-1 + Pi^2 - Pi^2/x^2 + x^2)/
x^2 + (E^(-1 + Pi^2 - Pi^2/x^2 + x^2)*Erf[x])/x^2, {x, 0, 1}]
The first term is integrated by Mathematica and we're left with the second integral
Pi^(3/2)*(E^(-1 + Pi^2)/(2*
Sqrt[Pi]) + (I*(DawsonF[1 + I*Pi] - DawsonF[1 - I*Pi]))/(2*
Pi) + E^(-1 + Pi^2)*
NIntegrate[(E^(-(Pi^2/x^2) + x^2)*Erf[x])/x^2, {x, 0, 1}])
which through integration by parts goes to
(-((Erf[Pi - I] + Erf[Pi + I])/(4*Sqrt[Pi])))*Erf[1] +
(1/(2*Pi))*
NIntegrate[(Erf[Pi/x - I*x] + Erf[Pi/x + I*x])/E^x^2, {x, 0, 1}]
Here I' m stuck . Maybe somebody finds the remaining integral . The best I could do was approximating the Erf term with 2:
N[Table[{Erf[Pi/x - I*x] + Erf[Pi/x + I*x]}, {x, 1/100, 1, 1/10}], 10]
(* {{2.000000000 + 0.*10^-10 I}, {2.000000000 +
0.*10^-10 I}, {2.000000000 + 0.*10^-10 I}, {2.000000000 +
0.*10^-10 I}, {2.000000000 + 0.*10^-10 I}, {2.000000000 +
0.*10^-10 I}, {2.000000000 + 0.*10^-10 I}, {1.999999999 +
0.*10^-10 I}, {1.999999846 + 0.*10^-10 I}, {1.999995465 +
0.*10^-10 I}} *)
so an approximative result (better than 1 % relative error) is
(Pi/4)*E^(Pi^2 - 1)*(1 + Erf[1])*(2 - I*Erfi[1 - I*Pi] + I*Erfi[1 + I*Pi])
NIntegrate[Exp[-(Pi*Tan[x] - 1)^2], {x, 0, Pi/2}]produces0.454151. $\endgroup$