Suicidal ideation can be caused by antidepressants treating a few forms of your depression, but not always all of it. What they can do basically is change the "functioning" of the brain, though possibly not your thoughts altogether. They sometimes cause suicidal thoughts due to many different theories or ideas like the following:
The medications might, paradoxically, worsen depression. Alternatively, they might energize people who previously were too paralyzed by depression to act on their suicidal thoughts. It also is known that antidepressants can cause, in some people, intense feelings of agitation and restlessness. These sensations may prompt a person to feel desperate for escape.