In Marvel comics, time travel exists, so it is possible for two versions of the same person from different timelines to meet. I would like to know if Thor ever fought another version of himself from a different timeline. If so, in which issue/s of the comics has this occurred?
It depends what you mean by Thor fighting himself from a different timeline. Since you mentioned time travel in your question, it sounds to me like you're asking whether the real Thor Odinson ever fought an older or younger version of himself from the past or the future. And if that's what you meant, then I don't believe a fight like that has ever happened.
We did see the real Thor meet an older version of himself, and later a younger version of himself as well, but they didn't fight one another, opting to team up instead.
Apparently, the Russo brothers planned to have a fight scene between the present and past Thor in Avengers: Endgame, but they had a change of heart and decided not to go with that.
If you count Thor Odinson fighting other versions of himself from alternate universes (with no time travel involved), then there've been two instances that I'm aware of. In the first instance, the Thor Odinson of Earth 616 (the Thor of the prime Marvel universe, who was known as Unworthy Thor at the time) fought the Thor Odinson of Earth-1610 (AKA, Ultimate Thor).
And in the second instance (which Raj cited in his answer), Ultimate Thor fought the Thor of Earth-16001 (AKA, Rune Thor). They had two fights, in fact, in consecutive issues, but the following image is from the first.
If you're willing to count Thor Odinson fighting other people who wielded his powers and used his name, then there've been several instances of that.
Thor Odinson has also had multiple fights with Beta Ray Bill, who doesn't typically use his name, but does wield his powers.
If you're willing to count other people with Thor's powers fighting each other, then there've been at least a couple of instances of that as well.
I'm fairly sure the last half-dozen examples weren't really the sort of thing you had in mind, but just in case I'm wrong about that, I decided to include them anyway.
If mortals possessing the power of Thor count as well, then there's at least one more example: In Thor # 440 Zarrko tricks Dargo Ktor, the Thor of the future, in to fighting Eric Masterson (when he was still Thor, before he became Thunderstrike).