Hey rorpan, I can't tell you what your problem is exactly but there are some steps you can take to deduce some problems.
You may want to first run a few benchmarking apps to see how well they run and if you crash or have problems.
Sisoft Sandra is the most prominant benchmarking tool for overall components. It also has a great burnin feature that will stress your computer out for as long as you tell it to. The burn in will report any errors or stop upon something critical. It is also free

(Pro version is $)
Sandra test everythig but its not as thorough as some specific apps for specific tasks.
memtest86 is a great memory tester which will also loop to check for errors.
you probably know of
3Dmark. The looping feature would help here but I don't know how precise the error reporting is.
motherboard monitor is also a great CPU and fan monitor[/l] I don't know if it has any serious diagnostic tools though.
There are others too to help diagnose problems. Hopefully some others will chime in and link some for you. Also make sure all your physical compnents are properly secured. Cable connections, RAM reseating, PCI/AGP card reseating. Check for firmware updates, bios updates, etc. Make sure everything is set properly. Go into your hardware profiles and make sure everything reports correctly. No IRQ/driver conflicts and such.
For now I'd run those linked utilities and do some testing. Still, random restarts indicate a hardware issue to me. I'd make double sure that all te connections look fine. You may also want to start testing different RAM modules too or relaxing the latency timings if they are very aggressive. I had a memory problem lately that looked like a ATA bus problem when trying to install a XP. It was actually cured by relaxing the memory timings from 2-2-2-6 to 2-3-3-6.
Also you said you get an error message and restart. Is it the Blue screen of Death? Whats the exact error message?
edit: fix link[/l]