Here is my trial of the first one.
1) Reducing the first integral into sum:
Skrytý text:
, but when

? That is if and only if there is

such that

i.e.

so the numerator is

on intervals

and is

otherwise. Thus
2) Non-rigorous computaion of the sum:
Skrytý text:Consider the function

. It can be expressed as an infinite power series, with infinite radius of convergence, and thus it can be analyticaly continuated in whole

. The zeros of

are

for

and

. Here comes the non-rigorous part - we will treat it as a polynomial and factorize it into ireducible terms over

. We obtain

and thus

which yields

and finally

3) I don't have the rigorous method but here are some thoughts:
Skrytý text:We can differentiate

term by term to get

and then try to solve this. Maybe using Fourier series of some siutable function. And then integrate it back.