Do you still have 40 psi fuel pressure as it dies, or does it drop as the rpm increases? Check for fuel in the vacuum line to the FPR, as this would indicate a torn diaphram and need for a new FPR. Since it revs higher with spray, that indicates a fuel related issue.