The best way is not to convert the xvid file at all. Many modern dvd players can play xvid or divx with no problems. All conversion processes will lose a bit of quality, though some encoders are extremely good and you might not notice the difference without close examination, or playing them back on a very large screen. If you don’t convert, all you have to do is burn as a data file and use good media. Divx compatible dvd players are relatively inexpensive these days too.
If you still want to convert to dvd format, the “best conversion” is probably using CCE (CinemaCraft Encoder), using 3 or 4 passes of VBR (variable bit rate) encoding, at a fairly high bitrate. You can use a bitrate calculator to find the best encoding rate, or just shoot for a high number like 8000kbps if the size of the file isn’t important. You may spin your wheels a little needlessly that way, but you will be assured of a good outcome. Last I saw, the full version of CCE was $1950 and the basic version that only supports 2 passes is about $60. This encoder will not hold your hand through the process though. You need to know how to set it. And you’ll need an authoring program to get the output mpeg2 files to dvd.
There are other, more user friendly choices, and I suggest using one of them. You can get great quality using FAVC, or Avi2DVD using the HC encoder. Both programs and the HC encoder are free to use. I tried FAVC recently as a test, and it was dirt simple to use and quality was virtually indistinguishable from the results I got using ProCoder (my conversion program of choice, and not cheap). Both AVI2DVD and FAVC will give you a finished dvd video, ready to burn to disk.
A relatively inexpensive commercial option that is popular around here is ConvertXtoDVD. Thought I’d mention it if you want yet another option.
Edit: Platinumsword beat me to the punch, but I had to do a lot more typing.