Do you have SHSH hashes save for 4.0 or 4.0.1?
If yes, download and run Tinyumbrella:
1) Make sure you Iphone is detected.
2) check "Advanced Options."
3) In new window, under "Device / Version," select 4.0.1 firmware.
4) Click on "Save my SHSH." Pray Cydia has them. If you don't get an error, it has been saved onto your computer.
5) Repeat to save other firmware hashes if you wish.
6) Now, click on "Display SHSHs." It should listed all hashes you have saved on your computer and the firmware version you can downgrade to.
7) Start "TSS server" and restore through iTunes with the downloaded firmware file (google) you can downgrade to in step #6.
8) If you phone get stuck during restore, trying "Kick out of recovery..."'in Tinyumbrella.