Should I include both failing and repeated grades when calculating my
GPA or just my last grade in that course?
If all your failings and repeated courses are reported in your transcripts, then you should report them too.
You should report all your official documents as they are and the applicant should never edit them or report them partially (by his own favor).
PS:
When you have your transcripts, your cGPA and also GPAs of each semester (including your passed, repeating and failed courses) is reported in the transcripts.
You can check whether the marks of your failed and repeating courses are calculated in your GPA or not. You should translate/report/recalculate your GPA exactly the same as they appear in your original transcripts.
Also, as you can see in one comment's liked question, the GPA calculation method differs from one country to another; so you don't need to re-calculate anything yourself (even, I think that by translating your GPA to another GPA-system by mistake may disturb your admissions opportunities); just officially translate your transcripts and send it to the admission office of the university you are aiming to study in. The admission office will recalculate your GPA based on their methods or they may then ask you for more supporting documents. Read the following quotation from the accepted answer to the question: How to convert from one grading scheme to another
Most countries have their own system which doesn't really make sense
as you try to "translate" them to some other system.
even, in this answer it is mentioned:
Don't convert between different grading schemes unless it is
explicitly mentioned what minimum grades you need for your own
country. Just apply and hope for the best.