Repair a failed root galaxy ace So here is my problem.

I've been formatting my Samsung Galaxy Ace (GT-S5839i) and it worked pretty much, but then i got mad and tried to root it, which i failed, and now my phone won't turn on anymore, it just stays on the start menu (The one where Samsung GALAXY Ace is printed) and it never goes any further.

I can access the recovery menu, but each time i tried to just wipe data/factory reset or wipe cache partition, it didn't help, so right now i'm stuck with a non working phone, which is not really funny !

Just so you know, before my phone stopped being useful, i tried to install some "ClockWorkMod", and i guess i didn't follow the steps as i should've.

So i'd like to know if anyone can offer a solution ?

I can still put files on the SD card, i just don't know how to go back to the gingerbread version i had before.

Thanks in advance ! (And sorry if i made any english mistake in my explanations)

EDIT :
I kept searching and i found a guide about ODIN and flashing the phone, and it worked very well ! My phone is now working like it never died !

You can find the guide i followed right here (The guide is in french, but if you look for flashing a phone with Odin, i think you can find a guide in english)
If you have rom manager before, then you can install any rom which you will find on different sites