If you've done all you can on the software side and nothing improves, and you're serious about wanting to play osu! without lag, you will have to seriously consider upgrading your hardware - at least to the level where it can play 2010 and newer 3D games without lag - and this means a discrete/dedicated graphics processor / GPU / videocard for desktops and certain laptops, and better laptops with more powerful graphics hardware for the rest.
Lasi i recall, a barebones desktop hardware package (4-core CPU, 4 GB DDR2 and motherboard with AT LEAST ONE PCI-Express x16 slot i.e. graphics card slot) will run at least $200, and a (PCI-Express, of course) graphics card will run anywhere from $75-150 or more. And please, don't be a cheapskate, get a Power Supply Unit (PSU) that is AT LEAST 500 Watts or more (and should have most, if not all the needed power connectors).
The rest are irrelevant with MAYBE the exception of Serial ATA standard hard disk drives, or if you intend to go bulls to the walls, an SSD for your Windows OS + performance emphasis programs e.g. osu! and the rest on some massive capacity SATA drive. (While you can still use your good old PATA/IDE hard drive, it probably won't be as fast in terms of program / file / song / beatmap loading times.
Of course, all of this assumes you can build your own PC and have the OS installation disc, drivers, etc.
Having a UPS is optional (maybe if your power company is a reliable one) but if you do, get one that is rated MORE than your PSU's max output + all vital peripherals' wattages. Just because the UPS says 600VA does NOT mean it can support 600 watts (it doesn't) - go look for the rated max wattage output of the UPS in battery power mode. I personally run my tower, modem, router and monitors on a 1200 watt UPS unit, and have been laughing off brownouts, power outages and power glitches/spikes/drops ever since.