What you've probably done is created a pop3 account which is set up to remove it from the server on download.
You can't undo this process unless Yahoo! mail has a back up feature. However, there are ways to restore it.
You are probably best to do a few things. First is, change the settings in Outlook to not delete from the server (or at least, keep a few months worth of data) or even review IMAP (details about this further down this post).
In regards to getting them back I would bite the bullet and start emailing all the emails to yourself. This of course is not only laborious but also has other negative effects such as filtering. You also need to do this after you change your email settings in Outlook.
Create a new account but use IMAP as this will keep a copy on the server. Then, this should sync them back automatically!
Keep it as a Pop3 account, open up the account options in Outlook (File, account settings, account settings). Double click on the email in question, click on advanced tab and then in the new window, the last tab (I think called Advanced (doing this from memory)) will have an option to delete from server or to keep for X amount of days.