I'm afraid it's not going to work.
It's very difficult to replace a DellGatewayHP motherboard with any other part for a couple of reasons. First, the I/O panel (where you connect your keyboard and USB components) on DellGatewayHP cases are not removable, and any case you get from Newegg is going to have different locations for almost all of the ports. Because they won't line up you won't be able to put the new motherboard in the old case.
If you get past that, your next problem will be turning the computer on. If you look inside a DellGatewayHP, you'll notice that all of the wires running to the front bezel for the power switch, reset buttons and LED's will attach to the motherboard with a block connector, like you have for the power supply. Those don't exist on aftermarket motherboards. To connect a DellGatewayHP case to an aftermarket motherboard, you'll have to trace down all of the wires in the block and identify them, then cut off the block and attach the teeny tiny connectors used on aftermarket cases and motherboards.
None of this is impossible, but it's a lot of effort when you can pick up a cheap aftermarket case for $30 and use any aftermarket board with it. Your memory and CPU will carry over to the new board, and the drives will mount in any case. Do this, toss your old HP case, and save yourself a ton of grief.