Since your EVO 4000 is obsolete, there's not a lot of detail at the CompaqHP site. I can't find enough description to tell if your 4000 is similar to the W4000 described here:
Document ID: DS020117_CW02 Version: 0 Evo Workstation W4000 Hangs, Reboots, or Has Video Corruption on After Waking From Standby
The issue may occur on Evo Workstation W4000 convertible minitower models operating in a Microsoft Windows XP Professional environment and having the following configuration:
USB Mouse or USB Keyboard connected.
Matrox G450 or G550 graphics controller installed.
Microsoft admitted a problem with USB mouse vs sleep mode some time back, with their put that if the mouse is moved while the computer is entering sleep mode you might not be able to "wake" the machine with the mouse – i.e. the USB port died. There were some additional symptoms but I don't recall the details (my memory's full of shit too?).
There is mention of some graphics card-associated problems for some EVO models, and updates to drivers and ROM; but I didn't see an EVO 4000 in the list. The search for "EVO 4000" reports "more than 200 hits" and I didn't look at all of them.
The page linked above has the same search box I used to get that page at the top. With a more specific model description you might narrow the search and home in on something.(?)
Using USB for both mouse and keyboard is a little suspect, depending on how the ports are wired. As mentioned above, having a particular number of USB sockets doesn't necessarily mean you have that many independent USB ports, since often it's two (or more) connectors to allow you to get to one port from different places.
I don't have a "diagnostic" method for USB disfunctions to pass on without some research. Maybe later. A simple way of seeing if there's a USB interference/conflict would be to get an external "USB n-port Hub" (n is the number of ports) and plug both of your devices into it. I've got one 5-port and one 7-port hooked up, to isolate all my many accessories. If possible, get one with a plug in power wall-wart, since USB devices do draw power from the socket they're plugged into, and inadequate power is another problem often found when plugging "many things" into the existing USB holes in the computer.
Question: Did you have both of these USB devices hooked up and working before the problem started; and have you added any other USB devices around the time that the instability first happened?
IF you add an external hub, WinXP should detect it and take care of the bridging and anti-loop setup, assuming the device you use is typical PnP. My two Belkin hubs were around $20 US each, so it's not "coffee change" unless you frequent Starbucks etc, but everybody needs at least ten USB ports just to be "fashionable."