The motor of my locomotive is dead.
I have two choices : repurchase it or buy a Power Functions replacement.
It is possible of customize my train 4563 to use the Power Functions motor?
If yes, what set to buy ? (88002, 8879, 8878 another?)
To expand on Michael's link-only answer: Older train motors were powered by the track and the speed of the train is controlled by a track-side switch.
Newer PF trains are powered by the battery box on the train and controlled by the remote which sends IR signals to the IR receiver.
This means your train needs room for
Fitting these into an older train or a modern train not designed for PF (such as the Constitution Train Chase) requires some rebuilding and some compromises. For the Constitution Train Chase I had to modify the coal tender to hold the battery box and the motor, and I had to put the IR sensor in the cab of the locomotive. This means unsightly wires slung between cars. However, when the train is in motion you don't really see that.
For a locomotive that already is designed to accommodate the old motor, there may be room inside it to fit the battery box and the IR sensor. You will have to sacrifice some of the interior.
Note that for summer 2018 there is a new train Power Functions system coming out, which is going to use a different system: a new motor connection, a new battery box, a new remote. The battery box will have Bluetooth or some other radio-frequency controller in it and thus you won't need the IR sensor anymore. This will save a lot of room in builds and eliminate the need for line of sight.
Here's LEGO's official answer to this:
Perhaps you'll need an extra wagon to hold the battery box.