Before you do anything, look at the price of a working camera that works before attempting the repair. Very often, you can get a nice used camera for the price of parts, especially for something this old. If the price of the repair is that much cheaper then replacement, then you can repair the camera if you decide to repair it rather then replace it.
There is going to be a lot of desoldering in this repair, so you will probably want to have a good soldering iron. It's probably also a good idea to practice soldering on junk first as well.
The best way to get parts is to find a camera with a good flash but has a lens error (this will show up as E18 on some older models) or a broken LCD, or maybe even a bad CCD. You're going to find parts are very difficult to find unless you buy a parts camera. I would suggest broken LCD or CCD so you can reliably test the flash with a few test pictures without a memory card. Your concern is the flash; not the lens, LCD or CCD.
If you are still having issues, it's either the parts donor camera had a bad flash or the board was bad. If it's the board and you know the flash is good, transfer the board from the parts camera to the old camera and move the back panel so the serial number is correct.
Here is the guide: Canon PowerShot A590 IS Flash Assembly Replacement