The best thing is to try to put the price you paid out of your mind (not easy, I accept). You are selling in today's market.
The house you are thinking of buying seems to have dropped in price even more than the one you are selling, so the price difference between the two houses has fallen. And that's what you should focus on: the difference between the prices of the two houses.
If you have the finance sorted, and can get your target house for €500k or less, I would say go for it.