An estimate of the sum related to primes I can't solve following exercise in a note about prime numbers. I need this for study about large gaps of consecutive prime numbers.
Prove that f $0<1-\delta<1$ then
$$\sum_{p\le y}\frac{1}{p^{1-\delta}}\le\frac{y^\delta}{\log(y^\delta)}+\log(1/\delta)+O\left(\frac{y^\delta}{\delta(\log y)^2}+1\right)$$.
In the note, a hint was given, that is "Split the sum at $p\le e^{2/\delta}$".
How this estimate can be proven?
 A: I only get
$$\sum_{p\le y}\frac{1}{p^{1-\delta}}\le \frac{y^{\delta}}{\log(y^\delta)}
+e^2\log(1/\delta)+O\Bigl(\frac{y^\delta}{\delta^2(\log y)^2}+1\Bigr).$$
The first sum is
$$\sum_{p\le e^{2/\delta}}\frac{1}{p^{1-\delta}}=
\sum_{p\le e^{2/\delta}}\frac{p^\delta}{p}\le e^2
\sum_{p\le e^{2/\delta}}\frac{1}{p}$$
and applying the known bound on the sum of reciprocal of primes we get
$$e^2\log\log e^{2/\delta}+ C+O{(\log x)^{-1}}= e^2\log(1/\delta)+O(1).$$
For the second sum  for $2^{1/\delta}<p\le y$ we have
$$=
\frac{\pi(y)}{y^{1-\delta}}-
\frac{\pi(2^{1/\delta})}{2^{(1-\delta)/\delta}}+(1-\delta)\int_{2^{1/\delta}}^y\pi(t)
t^{-2+\delta}\,dt\le$$
$$\le \frac{y^\delta}{y}\Bigl(\frac{y}{\log y}+O(y/(\log y)^2)\Bigr)+
(1-\delta)\int_{2^{1/\delta}}^y\frac{t}{\log t}
t^{-2+\delta}\,dt+$$
$$O\Bigl(\int_{2^{1/\delta}}^y\frac{t}{(\log t)^2}
t^{-2+\delta}\,dt\Bigr)=$$
$$\le\frac{y^{\delta}}{\log y}+O\Bigl(\frac{y^{\delta}}{(\log y)^2}\Bigr)+
\frac{1-\delta}{\delta}\frac{y^\delta}{\log y}+
O\Bigl(\frac{y^\delta}{\delta^2(\log y)^2}\Bigr).$$
A: By juan's answer above, one only needs to show $\sum_{p \leq e^{\frac{2}{\delta}}} \frac{1}{p^{1-\delta}} \leq \log \frac{1}{\delta} + O(1) $. But by estimating $p^{\delta} = 1 + O( \delta \log p )$, this sum is
$$ \sum_{p \leq e^{\frac{2}{\delta}}} \frac{1}{p} + O( \delta \sum_{p \leq e^{\frac{2}{\delta}}} \frac{\log p}{p}) = \log \frac{1}{\delta} + O(1 + \delta \times \frac{1}{\delta})
= \log \frac{1}{\delta} + O(1 )$$
A: It looks to me like the intended method is to use the loglog divergence of the sum of the reciprocals of the primes on the first sum, and then presumably the Prime Number Theorem with error term on the second. I'll admit that using a crude estimate on the first sum doesn't quite get the second term on the right hand side, so perhaps a further splitting is needed.
