In my experience, the symptoms you describe almost always mean the power supply is bad and needs to be replaced. Unfortunately, when a power supply goes bad, it loves to to take other components, at random, with it. You seem to have two options:
Save the computer
Cheaper but time consuming method: If you wish to save the computer, try running the computer with a known good power supply, a new one or a compatible one from another working computer. If that fixes the problem, great! Buy a new power supply. If it doesn't, then you need to isolate as few components at a time as possible and test them, but still with the known good power supply. When you find a bad one, replace it test again, until the problem is fixed. Once all the other pieces are fixed, you still won't know if the power supply is bad, unless you get it tested with proper test equipment. Whatever you do, you don't want to test it in another computer, then you'll end up with two dead computers instead of one. If you can't get it tested, but found other bad components, you may wish to replace it just to be safe.
The computer is lost
Expensive but quick method: For whatever reason, the above doesn't or won't work for you, then you need a new computer. Depending on how much damage has been done, you might end up building most of a new computer using the previous method anyway, and could have saved yourself the trouble by just buying a new one in the first place.
My recomendation: Try a good power supply and hope that fixes it. If it doesn't, then you're probably replacing the heart of the computer anyway, so get a new one, budget allowing.