Deleting thousands of Gmail messages is painful and kind of time consuming, by the use of Filters it has become quite easy, For this you have to :
1st Open Gmail in Basic HTML mode as, it will be easy for working, click on "settings" on right top corner( actually my internet speed is low therefore this process is best for me, otherwise on normal Gmail page goto gear icon(top right)>settings . After that all the process are same)
2nd This will open settings page, from there click on "Filters" tab, after that as indicated on picture Click on "Create a new Filter"
3rd In this step we have to fill this little form, Now its important and crucial part.
Here we can configure the filter, so that it will delete messages before that date
example: before:2013/02/01 , in this, all the messages before this date all be deleted.
The format is before:year/month/date. If you want to delete only messages from any particular email, in that case you have to write out the email address in the space provided for "From:", then proceed to "next step"
4th Now mark on "Delete it" and also mark "Also apply filter to xxx conversation below" , if you want to archive it then mark the first option, otherwise the messages will be deleted permanently. Now click on "create filter"
It will take few seconds for Gmail to delete your messages, once messages are deleted you can remove the filters. let me know if your problem solved.