I am a second year french phd student and two days ago I found out the topic I had been working on has already been studied, and the result I wanted to prove is basically already known. Unfortunately, neither I nor the supervisor were aware of this, and when looking at the literature I didn't find this out because it is formulated in a slightly different language than our own, and that's why we didn't find anything for so long. My bad, I should have looked more thoroughly, we only found this out by accident, I should have been more careful since this article is cited in other articles I was referring to. Anyway, what has already been done isn't EXACTLY what I want to do, the setting is different, but the conclusion is practically the same, apart from the different setting (even worse, I think my hypotheses need to be a little more restrictive).
Now, this is bad, I know it. But according to my supervisor, a different approach to look at a problem can be in itself interesting, altough it is very much less interesting than it would have been if there hadn't been the other proof. Even more so since (apparently) my approach is worse! My question is: have you ever been in a similar position? What are your sincere thoughts on this? I feel like this is completely meaningless, and that there's little hope to one day find post-doc positions since my work is, to sum up, not new but rather a rediscovery of something but in another (less convenient, apparently) formulation. At the same time, the idea of throwing everything in the bin and start all over is very, very scary and demoralising.