How do I convert a real baseband signal to a complex baseband signal?
To convert a real signal sampled at rate $2B$ to its complex baseband representation (sampled at rate $B$), you want to map the frequency content in the range $[0, B)$ in the real signal to the range $[-\frac{B}{2}, \frac{B}{2})$ in the resulting complex signal. This can be done in a couple different ways:


Design a linear filter to approximate a Hilbert transform. Run your real signal $r[n]$ through the filter to yield the transformed signal $\tilde{r}[n]$. Use this to form the analytic signal:
$$
r_a[n] = r[n] +j\tilde{r}[n]
$$ 
$r_a[n]$ will contain only the positive frequency components of the original real signal $r[n]$; all of the negative frequencies will be zero (assuming a perfect Hilbert transformer; in practice, the effect will not be perfect). Thus, you have isolated the desired frequency band $[0, B)$. 

Multiply $r_a[n]$ by $e^{-j\frac{\pi}{2}n}$ to effect a frequency shift of $-\frac{B}{2}$, shifting the desired frequency content to the range $[-\frac{B}{2}, \frac{B}{2})$. Then, decimate the signal by 2 by discarding every other sample. The result is a complex baseband signal sampled at rate $B$.
My preferred approach is a more straightforward implementation of the shift that you're looking for:


Multiply $r[n]$ by $e^{-j\frac{\pi}{2}n}$ to effect a frequency shift of $-\frac{B}{2}$, shifting the desired frequency content to the range $[-\frac{B}{2}, \frac{B}{2})$. The result is a complex signal that is centered in the appropriate place (the center of the band is at zero frequency).
Apply a lowpass filter to pass only the content in the range $[-\frac{B}{2}, \frac{B}{2})$ (to the extent required while meeting your application's antialiasing requirements).
Decimate the signal by 2 by discarding every other sample. The result is a complex signal sampled at rate $B$.



In practice, I always use some variant of strategy #2. You can make it even more computationally efficient by implementing the decimation as part of the lowpass filtering process, for instance with a polyphase filter.