You can but you have to buy a regular standard case which comes normally with a power supply to host the new mainboard then move RAM, hard disk drive, CPU and forget the heatsink because you have to buy a heatsink+fan specifically for LGA1155 socket.
I have a similar situation: I've been struggling for a while now with my HP Compaq Elite 8300 USFF (usdt).
I bought a used one like this HP 8300usdt (Ultra Small DeskTop); also called USFF (Ultra Small Form Factor) from a USA seller in ebay. It is extremely quite, always cold & never gets warm even in summer & at lowest fans speed. Very fast with 24GB mSATA configured as RAID cache drive to a 500GB 7200rpm HDD. My CPU is i5-3570S with 8GB RAM & 135w power brick. The bad news is that I consumed 3 mainboards within first year; all from ebay. They just suddenly die. Every mainboard lasts between few weeks to few months. The fault is that there is no POST (Power On Self Test) display. Within a minute later the 2-internal PWM-Fans increase their speed to a scary loud level until you plug it off. No one on the internet or locally knows how to fix it. Now I'm going to buy a non-HP mainboard of same CPU-socket LGA1155 & move all the parts to it. One last thing: I'm a computer technician & I've tried every way I could to diagnose the problem to no avail. Anyone who would like to discuss the problem or knows for sure how to fix the mainboard please let me know. My email is: firstname.lastname@example.org