Scan it for codes for starters, Autozone in the U.* can do this for you.
My guess is, if its stumbling around at WOT in gear, it could very well be your CAT Converter, crawl under the car, and kick it firmly a few times, do you hear rattling like there is broken parts in there? MY 93 had this problem, had it replaced with a high performance one for about 150 bucks.
Another suggestion, test, or have your TPS and MAF sensors tested. There readings should be consistent as the throttle is opened. This is much better tested on a scan tool rather than a digital multimeter.
Get a chiltons repair manual for your car, BIG help, trust me! 20 bucks Wal-Mart.
EDIT: Also you said it was running only on 4 for a while, change the 02 sensor, will help for fuel econ, and will also help it run better...from my experience anyways.
Damien-they don't make them like this anymore
97 SSEi. 3.2mps,msd,optima,1.9 YTs,245 RE750s,SLP Headers,custom ported SC inlet/outlet, 180 deg, INTENSE pcm,42.5#injectors,255lph pump,custom soilid motor mount, 3.0 mps(maybe), and the nut behind the wheel.