I have a preprint X that is sitting in the ArXiv for which I am not sure if it is still worth publishing. It turns out the paper I wrote has considerable overlap with another preprint Y after one of its authors informed me about it through email. Consider the following:

Paper Y was posted in the ArXiv just a month before I posted mine, and I was not aware of its existence previously. Prior to posting paper X, I looked for as many papers with related results to include in my discussion, but due to the differences in the terminologies used, Google did not show paper Y in the results. In order to find paper Y on Google or ArXiv, one would have to use a different set of keywords. It appears that we have been working on the same problem, they just finished first and had a month of lead.

I am aware that alternate proofs are sometimes of interest and are therefore worth publishing, and I am trying to determine if this is the case with my paper. Since I wrote paper X independently and without knowledge of the existence of paper Y, my proof was essentially different and indeed the two papers have very different motivations for the constructions used. However, while the methods used as different, they have the same "flavor" and the key results in both papers use different versions of the same pre-existing theorem.

If there is anything drastically different from the results of both papers, it would be the length. My proofs are shorter than theirs, use less lemmas and mathematical machinery. Paper Y derives a few more corrolaries which are not in paper X, but even if one compares the length of both papers using only the parallel or similar portions, my paper is still significantly shorter than theirs. I can also make the argument, understandably a subjective one, that my methods are simpler. However, results of Paper Y are, to a certain degree, more general than mine and therefore, technically my results follow from theirs.

My questions are as follows:

Should I still submit my paper to a journal?

If yes, how should I deal with the existence of paper Y in my own paper? I feel obliged to cite it, but I'm not really sure how to discuss the similarity and differences between the results. Should I tell the editor about the situation?

Should I make other assumptions on the reason behind the author of Paper Y for sending me an email about their paper, other than to inform me that our papers have the same results? If you were in the shoes of the author of paper Y, what would you prefer that I do?