Take money in peace deals, that money will be considered as a grant to yourself (I think I heard this from Huzics but cant be sure. I havent tested this so I dont know if it works.)
It doesn't work exactly as a grant, since there is no random component to how much +rel you get. For every 250 D recived you get EXACTLY +10 relations.
Anyway, as I see it there are 2 theories of why there is a rel value towards yourself.
1) It's just in not to breake the game enigine when relations affect yourself in some manner. Unfortunately it has an unwanted/unintentional sideeffect that mess up the Election process for the HRE, which the programmers completly missed (ie it's a bug).
2) It is an intended effect that affects several things (yet unkown to us, perhaps the chance to get a revolt?) in the game among which th HRE election process is just one.