Is it okay to use SMT for 250VAC parts?
Creepage is the term you're looking for.  You'll want to use that for trace spacing too.  If the part is rated for 400V it's good for it.  However, you may have more than 400V.  240Vac is actually RMS voltage and has a tolerance.  Add 10% to the line voltage (240*.1= 264Vac) to accommodate its tolerance and remember to design your circuit with the possibility of being supplied 10% less of 240V.  Convert to peak-peak voltage (264x1.414= 373.3) because flash-overs pay little attention to time.  Now, you could fret about aging components, temperature cycling, dust, moisture, bad luck and worse math then decide to add another 10% to the figure (373.3+10%= 410.6Vp-p) "just to be sure."  That's cutting it close, but if you throw an MOV across the line (behind the fuse, of course) then maybe that'll be enough to redeem you from omitting that last 10% and keep your house from burning down.  Maybe.

Concerning SMT vs. TH transients, the components are rated as they're rated.  400V applies whether you're reading a TH or SMT datasheet.