Remember that the board you use must accept the CPU of the one in your failed eMachine board.
The hard drive is likely good, but the Windows on it will detect that the motherboard has changed, and then it will shut down. Sometimes the eMachines recovery disk will work if you run it in repair mode, or if you run a full new install, but usually not on that T2245 model. It is designed to seek out the code on the eeprom on the motherboard to verify that it is allowed to run a repair or install on the new equipment. So you may have to buy a new copy of Windows XP. Your memory will be good, but the power supply will not be good, or in the rare case when it is good, it may not have enough power for the new motherboard.
So expect to buy a new motherboard, a new CPU heatsink and fan, thermal paste, and a windows disk.
Or just buy a decent rebuilt Dell or HP or Gateway, and an external USB enclosure so you can rescue the data on the old eMachines drive and move it to the new or used drive. It will cost you less than the replacement board, power supply, and Windows.