And di is feminine but in the you-dont-have-to-use-it way (like the article ei)?
It's a package deal: If you use the feminine declination of the noun, then you need to follow up with the feminine possessive, while if you opt for the masculine declination, you go masculine for the possessive as well.
"Di" is used with feminine singulars, and "din" is used with masculine singulars.
You need to memorise the gender with the noun. If you get into the habit of learning each noun with its indefinite article, you'll be able to tell the gender from that: "en sko" (m), "ei sol" (f), "et hav" (n).
There are a few rules matching endings to grammatical gender, but they only work for select loanwords, so it's best to get into the habit of committing the articles to memory.
do we have to put an -en at the end of kopp if it's followed by a possessive pronoun?
Yes. Not if the possessive is before, you could say "din kopp", but that's not the preferred way of saying it.
You can say either "din kopp" or "koppen din", but the latter is preferred.