In general, it is possible for the AI to stop rivalling you after some time and pick another rival instead. To increase the chances of that happening, it may be a good idea to reload the game after some time because it makes the AI recalculate its rivalries.
But in the case of Denmark and Sweden, they are very close to each other and of similar strength so I think the AI will keep hating you forever unless one of you grows too strong. In order to play a peaceful Scandinavian game, you'd have to play Denmark (and make sure nobody revolts) or Norway (try to break free while Sweden remains a subject of Denmark - after that, Denmark will love you due to the historical friends modifier). However, winning the independence war as Norway is also more difficult than as Sweden and you pretty much have to take the province "Dalaskogen" in the peace deal to improve Norway's terrible economy.