I am writing a systematic literature review and the problem is that in my subject there are multiple cases of previous work re-publishing or self-plagiarism: the same authors write multiple (2-3) papers on the same topic with almost no changes. I wonder how to deal with it. I am reviewing a theoretical models, so I cannot simply decide whether the paper describes the same or different experiments. The duplicated papers usually differ in some minor ways. I would like to create a graph of how my chosen topic was developed in time by plotting different papers and their citations and which model was based on which previous one. But I don't know how to deal with this kind of duplicate papers. Merge them into single, first paper? Plot all of them as a derivative models? Or maybe I should somehow graphically mark the papers which describe the same content?
Since you do not want to address the matter of duplicate or multiple publication (I prefer those terms; I dislike the dubious notion of "self-plagiarism"), I will focus only on the matter of handling the existence of such works in the literature other than choosing to ignore some of the publications.
What you describe seems similar to a concern that comes up in meta-analysis (a statistical approach to literature reviews). For the statistics underlying meta-analysis to work, an important statistical assumption is that each publication being analyzed is independent of each other so that each publication counts as a distinct piece of evidence. But this assumption is violated if two or more studies were conducted on the same dataset (which might involve the same group of authors, but not necessarily so, especially if the dataset is public). There are different ways for handling the resulting statistical problems, but they generally involve giving each of the non-independent studies a lower weight so that altogether they would have around the same weight in the overall meta-analysis as any one independent study.
Following this principle, if you have a case of non-independent studies (that is, your case of duplicate publications), you could weight them in some way as just one study. I cannot recommend how best to do this without knowing in-depth the nature of your study, the nature of the duplication, the extent of overlap, etc. You would need to consider your particular situation and then decide how best to represent these duplicate publications as one data point (whether that means taking an average of results, the first publication, the last publication, the most highly cited result, or whatever representation you think most appropriate).
In your final analysis, it might be a good idea to present and compare two sets of results, as is sometimes done in meta-analysis: one set treats each duplicate as an independent study, and then another analysis uses your chosen aggregation approach to group all the duplicates as one piece of evidence. That way, you could see if the duplicate publications sway the overall evidence significantly or not, which is valuable to see.
I would like to create a graph of how my chosen topic was developed in time by plotting different papers and their citations and which model was based on which previous one.
I think the answer to your question will not actually solve your problem. Publications and citations do not describe how the research has developed. Instead of doing this, I suggest creating a graph of how the research outcomes have changed over time.
Classic example: https://www.nrel.gov/pv/cell-efficiency.html
This approach will avoid the problem of duplicate publication.